summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2020-03-10 11:26:02 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2020-04-03 13:32:56 +0200
commit4aee10b9da975e91848b7683757358baf3a42792 (patch)
tree43eb6282fbe291a0e3bc940306f2edeb495d280f /src/corelib/thread/qthread.cpp
parentcabd8f860b54c1692bd03876c1bfcc3e14b56503 (diff)
No-thread: Don’t assert in ~QThreadData()
The no-thread build is not maintaining the QThreadData refcount. Change-Id: I80ce4151b8da9391764ed3d820943dcac0d70999 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index d18056063f..6a736bcfa8 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -67,7 +67,9 @@ QThreadData::QThreadData(int initialRefCount)
QThreadData::~QThreadData()
{
+#if QT_CONFIG(thread)
Q_ASSERT(_ref.loadRelaxed() == 0);
+#endif
// In the odd case that Qt is running on a secondary thread, the main
// thread instance will have been dereffed asunder because of the deref in