diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-21 13:16:39 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-11-24 20:47:01 +0100 |
commit | 4ad19d552ce426d00503c739c2ea62bb4e1c8e62 (patch) | |
tree | 6aafb2d83c5a390854e6687fb784bc1c2e4c52ae | |
parent | aca996b35e508f4b7efe31f89b1b47005c08098a (diff) |
Don't create an animation timer when destroying the animation job
QQmlAnimationTimer::instance() takes an optional boolean "create"
parameter that defaults to true. Creating the timer when shutting down
the process requires access to thread-local storage, which might already
be destroyed as part of process shutdown, resulting in a segfault from
a Q_ASSERT.
We don't want to create any timer at this point.
Change-Id: If73a6a3db138d01e818ee8cbbfa517a7ff14c59c
(cherry picked from commit 0e797296f9bb590926803463c32681e7fcd46064)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/qml/animations/qabstractanimationjob.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp index 0b4a99c958..2541253b1b 100644 --- a/src/qml/animations/qabstractanimationjob.cpp +++ b/src/qml/animations/qabstractanimationjob.cpp @@ -282,7 +282,7 @@ QAbstractAnimationJob::~QAbstractAnimationJob() Q_ASSERT(m_state == Stopped); if (oldState == Running) { - Q_ASSERT(QQmlAnimationTimer::instance() == m_timer); + Q_ASSERT(QQmlAnimationTimer::instance(false) == m_timer); m_timer->unregisterAnimation(this); } Q_ASSERT(!m_hasRegisteredTimer); |