diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-21 13:16:39 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-21 13:32:27 +0200 |
commit | 0e797296f9bb590926803463c32681e7fcd46064 (patch) | |
tree | 806d4811c64891880c0785028c1d8b827c301014 /src/qml/animations/qabstractanimationjob.cpp | |
parent | b292e112399dfcf70ff21d3e18ce3bba98bb4b17 (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.
Pick-to: 6.2
Change-Id: If73a6a3db138d01e818ee8cbbfa517a7ff14c59c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/animations/qabstractanimationjob.cpp')
-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 9e82b63771..e975b3e29e 100644 --- a/src/qml/animations/qabstractanimationjob.cpp +++ b/src/qml/animations/qabstractanimationjob.cpp @@ -280,7 +280,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); |