From 4aee10b9da975e91848b7683757358baf3a42792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 10 Mar 2020 11:26:02 +0100 Subject: =?UTF-8?q?No-thread:=20Don=E2=80=99t=20assert=20in=20~QThreadData?= =?UTF-8?q?()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The no-thread build is not maintaining the QThreadData refcount. Change-Id: I80ce4151b8da9391764ed3d820943dcac0d70999 Reviewed-by: Lorn Potter --- src/corelib/thread/qthread.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.3