aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-05 16:39:29 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-08 13:14:58 +0000
commit5c0b7f73aa7d901c41c09450a7fcff182015f7c2 (patch)
tree7f722448d1e07665679aeb380419ee32d450c8b7
parent65fa1b4c0868ae4898e6753cecf2952dc87034ac (diff)
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 <mitch.curtis@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
-rw-r--r--src/quick/util/qquickanimatorjob.cpp2
1 files changed, 2 insertions, 0 deletions
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) {