From 5c0b7f73aa7d901c41c09450a7fcff182015f7c2 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 5 Jan 2016 16:39:29 +0100 Subject: QQuickAnimatorController: fix dangling QQuickAnimatorProxyJob pointer We're hitting crash problems in controls2 auto tests where QQuickAnimatorController::stopProxyJobs() contains dangling pointers in m_proxiesToStop. The window for these proxy jobs had been already reset, so the destructor of QQuickAnimatorProxyJob was not removing it from QQuickAnimatorController's m_proxiesToStop. Change-Id: I89e3b174c86dfb217a555f07ee1ce4c42cbcf204 Reviewed-by: Mitch Curtis Reviewed-by: Gunnar Sletta Reviewed-by: Robin Burchell --- src/quick/util/qquickanimatorjob.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index 0182f8abfb..eb627609bf 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -160,6 +160,8 @@ void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window) // Upon leaving a window, we reset the controller. This means that // animators will only enter the Starting phase and won't be making // calls to QQuickAnimatorController::startjob(). + if (m_controller) + m_controller->proxyWasDestroyed(this); m_controller = 0; } else if (!m_controller && m_job) { -- cgit v1.2.3