aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickanimation.cpp')
-rw-r--r--src/quick/util/qquickanimation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp
index 2f3bc66013..023f5a9b51 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;