summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qglobalstatic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index 098aee966b..1e35cb29f0 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -76,9 +76,9 @@ template <typename QGS> union Holder
~Holder()
{
- guard.storeRelaxed(QtGlobalStatic::Destroyed);
- std::atomic_thread_fence(std::memory_order_acquire); // avoid mixing stores to guard and *pointer()
pointer()->~PlainType();
+ std::atomic_thread_fence(std::memory_order_acquire); // avoid mixing stores to guard and *pointer()
+ guard.storeRelaxed(QtGlobalStatic::Destroyed);
}
PlainType *pointer() noexcept