aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimation.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-10-12 23:00:20 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-10-12 23:00:20 +0300
commit4826f86e274f1b29bd769e6790824f9e62a40f62 (patch)
treec2cc4bb09ca91951a2641e33c3b0a65deb0af877 /src/quick/util/qquickanimation.cpp
parent0f0972d542d9869c2dcfaf9c963d42ff32766460 (diff)
parent844f9b9b376838bcb44324984876f8bf99d85d38 (diff)
Merge tag 'v6.5.7-lts-lgpl' into 6.56.5
Qt 6.5.7-lts-lgpl release
Diffstat (limited to 'src/quick/util/qquickanimation.cpp')
-rw-r--r--src/quick/util/qquickanimation.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp
index 548ec8415a..7cbd3ea741 100644
--- a/src/quick/util/qquickanimation.cpp
+++ b/src/quick/util/qquickanimation.cpp
@@ -130,7 +130,8 @@ void QQuickAbstractAnimationPrivate::commence()
QQmlProperties properties;
auto *newInstance = q->transition(actions, properties, QQuickAbstractAnimation::Forward);
- Q_ASSERT(newInstance != animationInstance);
+ // transition can return a nullptr; that's the only allowed case were old and new have the same value
+ Q_ASSERT(newInstance != animationInstance || !newInstance);
delete animationInstance;
animationInstance = newInstance;
@@ -290,6 +291,11 @@ void QQuickAbstractAnimation::setRunning(bool r)
// Therefore, the state of d->running will in that case be different than r if we are back in
// the root stack frame of the recursive calls to setRunning()
emit runningChanged(d->running);
+ } else if (d->animationInstance) {
+ // If there was a recursive call, make sure the d->running is set correctly
+ d->running = d->animationInstance->isRunning();
+ } else {
+ d->running = r;
}
}