From 48b707224efaa54b4dfd831cfd8fbe9006f99588 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 14 May 2019 12:37:40 +0200 Subject: Fix invalid vptr during destruction of animations Fixes UBSAN warnings about objects used after partial destruction. Change-Id: Iceea083a77d47335ef595c0ff97b87f35f42e56f Reviewed-by: Ulf Hermann --- src/corelib/animation/qsequentialanimationgroup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/animation/qsequentialanimationgroup.cpp') diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 150e74d7d67..66e346a2fef 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); -- cgit v1.2.3