diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-05-28 10:35:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-29 08:23:05 +0200 |
commit | 114c9a16e240558a8aea2004696369e78ef5ac80 (patch) | |
tree | ade3078c0a292280944a3c722bf21d7edf68d9a0 /src/qml | |
parent | 56c1111d392ac6bfb33559f1ca4e09e4e258a777 (diff) |
Animations: Avoid accessing invalid memory if stop() triggers deletion
Return immediately if calling stop() results in the current object being
deleted.
Task-number: QTBUG-31247
Change-Id: I684a858bfb4cc53f415daa8cc1c4df96067daa1c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/animations/qsequentialanimationgroupjob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/animations/qsequentialanimationgroupjob.cpp b/src/qml/animations/qsequentialanimationgroupjob.cpp index c649370680..b82e1850f7 100644 --- a/src/qml/animations/qsequentialanimationgroupjob.cpp +++ b/src/qml/animations/qsequentialanimationgroupjob.cpp @@ -226,14 +226,14 @@ void QSequentialAnimationGroupJob::updateCurrentTime(int currentTime) if (atEnd()) { //we make sure that we don't exceed the duration here m_currentTime += m_currentAnimation->currentTime() - newCurrentTime; - stop(); + RETURN_IF_DELETED(stop()); } } else { //the only case where currentAnimation could be null //is when all animations have been removed Q_ASSERT(!firstChild()); m_currentTime = 0; - stop(); + RETURN_IF_DELETED(stop()); } m_previousLoop = m_currentLoop; |