aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimatorcontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickanimatorcontroller.cpp')
-rw-r--r--src/quick/util/qquickanimatorcontroller.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/util/qquickanimatorcontroller.cpp b/src/quick/util/qquickanimatorcontroller.cpp
index cfb6037d14..74930fb373 100644
--- a/src/quick/util/qquickanimatorcontroller.cpp
+++ b/src/quick/util/qquickanimatorcontroller.cpp
@@ -140,6 +140,11 @@ static void qquick_initialize_helper(QAbstractAnimationJob *job, QQuickAnimatorC
{
if (job->isRenderThreadJob()) {
QQuickAnimatorJob *j = static_cast<QQuickAnimatorJob *>(job);
+ // Note: since a QQuickAnimatorJob::m_target is a QPointer,
+ // if m_target is destroyed between the time it was set
+ // as the target of the animator job and before this step,
+ // (e.g a Loader being set inactive just after starting the animator)
+ // we are sure it will be NULL and won't be dangling around
if (!j->target()) {
return;
} else if (c->m_deletedSinceLastFrame.contains(j->target())) {