diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-13 08:32:12 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-14 16:30:41 +0100 |
commit | 23680b185dd6fa4eb1fef76f77b4c9acf0f161fe (patch) | |
tree | 9c25e63482ed321804eae0ac6c9174fe0f59b0ee /src/quick/util/qquickspringanimation.cpp | |
parent | 44e204ea9dce4681b74181c6b4bf93fbad485c64 (diff) |
Don't dereference a null animationTemplate
If the SpringAnimation gets used inside a Transition, the
animationTemplate might get cleared, but updateCurrentTime()
still gets called on the SpringAnimation after that.
Task-number: QTBUG-34539
Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/quick/util/qquickspringanimation.cpp')
-rw-r--r-- | src/quick/util/qquickspringanimation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/util/qquickspringanimation.cpp b/src/quick/util/qquickspringanimation.cpp index efaa5ba56c..36aae36459 100644 --- a/src/quick/util/qquickspringanimation.cpp +++ b/src/quick/util/qquickspringanimation.cpp @@ -308,7 +308,8 @@ void QSpringAnimation::updateCurrentTime(int time) QQmlPropertyPrivate::DontRemoveBinding); if (stopped && old_to == to) { // do not stop if we got restarted - stopTime = animationTemplate->elapsed.elapsed(); + if (animationTemplate) + stopTime = animationTemplate->elapsed.elapsed(); stop(); } } |