diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-14 12:37:40 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-23 16:15:00 +0200 |
commit | 48b707224efaa54b4dfd831cfd8fbe9006f99588 (patch) | |
tree | 7cdefb068ef609ba1252d5bca0e5f4aabc5f7bfe /src/corelib/animation/qsequentialanimationgroup.cpp | |
parent | cf7d990a486b406d558e3291247d4323a9f48c73 (diff) | |
download | qtbase-48b707224efaa54b4dfd831cfd8fbe9006f99588.tar.gz |
Fix invalid vptr during destruction of animations
Fixes UBSAN warnings about objects used after partial destruction.
Change-Id: Iceea083a77d47335ef595c0ff97b87f35f42e56f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib/animation/qsequentialanimationgroup.cpp')
-rw-r--r-- | src/corelib/animation/qsequentialanimationgroup.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 150e74d7d6..66e346a2fe 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -532,7 +532,8 @@ void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnim Q_Q(QSequentialAnimationGroup); QAnimationGroupPrivate::animationRemoved(index, anim); - Q_ASSERT(currentAnimation); // currentAnimation should always be set + if (!currentAnimation) + return; if (actualDuration.size() > index) actualDuration.removeAt(index); |