aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrenderloop.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@sletta.org>2015-07-02 15:54:43 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-07-04 19:59:52 +0000
commit982fa2225b7d69181344a00816cad19042a922e6 (patch)
tree3ccb505de40e103b48cbefcc85ed5ab76d5980c5 /src/quick/scenegraph/qsgrenderloop.cpp
parenteeee9f1466ffaf17f81d635c2e43dca76ce5b021 (diff)
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 <liang.qi@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/quick/scenegraph/qsgrenderloop.cpp')
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp3
1 files changed, 3 insertions, 0 deletions
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 <private/qquickanimatorcontroller_p.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QTime>
@@ -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)