diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index a7b7edbc33..e7d2ac4961 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1156,8 +1156,10 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const void QCommonStylePrivate::stopAnimation(const QObject *target) const { QStyleAnimation *animation = animations.take(target); - if (animation && animation->state() != QAbstractAnimation::Stopped) + if (animation) { animation->stop(); + delete animation; + } } /*! \internal */