diff options
-rw-r--r-- | src/corelib/animation/qsequentialanimationgroup.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 8b364384f4..1d0b799fef 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -503,8 +503,10 @@ void QSequentialAnimationGroupPrivate::_q_uncontrolledAnimationFinished() */ void QSequentialAnimationGroupPrivate::animationInsertedAt(int index) { - if (currentAnimation == nullptr) + if (currentAnimation == nullptr) { setCurrentAnimation(0); // initialize the current animation + Q_ASSERT(currentAnimation); + } if (currentAnimationIndex == index && currentAnimation->currentTime() == 0 && currentAnimation->currentLoop() == 0) { |