diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-06 11:01:06 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-08 07:11:24 +0200 |
commit | c46088d2f4932319f6a153142bd2d9da30f94c76 (patch) | |
tree | aedd787c659e6e2cfe6c4d2825abb9d8d3dc3869 /src/quick/util/qquickanimatorjob.cpp | |
parent | 8076b428d2e6b8de8bacf556b8dccb5bbd99e0ac (diff) |
Fix crash when animators are deleted just after being started.
Change-Id: I35850e279dae596edb9a1b93143d6aa195221b41
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/quick/util/qquickanimatorjob.cpp')
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index 0bf95a49b4..9f81f28b7a 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -97,9 +97,11 @@ QQuickAnimatorProxyJob::~QQuickAnimatorProxyJob() void QQuickAnimatorProxyJob::deleteJob() { if (m_job) { - if (m_controller && m_internalState != State_Starting) + // If we have a controller, we might have posted the job to be started + // so delete it through the controller to clean up properly. + if (m_controller) m_controller->deleteJob(m_job); - else if (m_internalState == State_Starting) + else delete m_job; m_job = 0; } |