aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquicksmoothedanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquicksmoothedanimation.cpp')
-rw-r--r--src/quick/util/qquicksmoothedanimation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/util/qquicksmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp
index 017fe39003..9e9e6cb419 100644
--- a/src/quick/util/qquicksmoothedanimation.cpp
+++ b/src/quick/util/qquicksmoothedanimation.cpp
@@ -242,6 +242,9 @@ qreal QSmoothedAnimation::easeFollow(qreal time_seconds)
void QSmoothedAnimation::updateCurrentTime(int t)
{
+ if (!isRunning() && !isPaused()) // This can happen if init() stops the animation in some cases
+ return;
+
qreal time_seconds = useDelta ? qreal(QQmlAnimationTimer::instance()->currentDelta()) / 1000. : qreal(t - lastTime) / 1000.;
if (useDelta)
useDelta = false;