From 885d3cfd658d2003cea5cdc8b7c347748ce030dd Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 14 Nov 2011 15:11:45 +0100 Subject: [PATCH] Fixed assert during QML shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I680af9ccb417d3162277b5740a129ecd77feee7f Reviewed-by: Samuel Rødal --- src/declarative/items/qquickcanvas.cpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/declarative/items/qquickcanvas.cpp b/src/declarative/items/qquickcanvas.cpp index dfdaaed..d5003e9 100644 --- a/src/declarative/items/qquickcanvas.cpp +++ b/src/declarative/items/qquickcanvas.cpp @@ -864,6 +864,12 @@ QQuickCanvas::~QQuickCanvas() { Q_D(QQuickCanvas); + /* The threaded renderer will clean up the nodes which will fire + sceneGraphChanged events through back to the canvas. This signal + is connected to maybeUpdate which should only be called from GUI or during + updatePaintNode(), so disconnect them before starting the shutdown + */ + disconnect(d->context->renderer(), SIGNAL(sceneGraphChanged()), this, SLOT(maybeUpdate())); if (d->thread->isRunning()) { d->thread->stopRendering(); delete d->thread; -- 1.7.2.5