From 982fa2225b7d69181344a00816cad19042a922e6 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 2 Jul 2015 15:54:43 +0200 Subject: Delete QQuickWindow's animator driver at the right time. For the non-threaded renderloops, we there might be a timer firing before the animationController is cleaned up through deleteLater() which will then reference the deleted QQuickWindow. Rely instead on direct and explicit cleanup at the right time in each render loop. Change-Id: Id81daddae78ce3922d6a932fb21200f2dc7955bb Task-number: QTBUG-33723 Reviewed-by: Liang Qi Reviewed-by: Robin Burchell --- src/quick/scenegraph/qsgrenderloop.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/quick/scenegraph/qsgrenderloop.cpp') diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index ec9c3c39f9..4d3f34c71c 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -34,6 +34,7 @@ #include "qsgrenderloop_p.h" #include "qsgthreadedrenderloop_p.h" #include "qsgwindowsrenderloop_p.h" +#include #include #include @@ -305,6 +306,8 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window) } else if (gl && window == gl->surface() && current) { gl->doneCurrent(); } + + delete d->animationController; } void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) -- cgit v1.2.3