aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-06-22 18:11:06 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2011-06-22 18:11:06 +1000
commit26a18e5d03310dc69bfe97bac1ff512b3d62c475 (patch)
tree9c3b8a412c6bb693723066eb4d9a8e8928ff65c1
parent6938289ce3e1e29cc81f0e007390e0b5f6ef1a43 (diff)
Correctly wait for render thread to exit
-rw-r--r--src/declarative/items/qsgcanvas.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index 0500b752c7..97d643dae6 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -2316,6 +2316,13 @@ void QSGCanvasRenderThread::stopRenderThread()
}
unlockInGui();
+
+#ifdef THREAD_DEBUG
+ printf("GUI: waiting for render thread to terminate..\n");
+#endif
+ // Actually wait for the thread to terminate. Otherwise we can delete it
+ // too early and crash.
+ QThread::wait();
}