summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-05-16 18:16:04 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-05-16 18:16:04 +0300
commit231d3670981a33ec42b91ad1cb33c1fc50551066 (patch)
treeb1ef1096f4e279baaa2ea0d2daf14b5c4185a82f /src/corelib/thread/qthreadpool.cpp
parentffdd372c7bbda62e9d937f406319f38e3e982774 (diff)
parent8fc1a885d19a2dfb1a3a684aea1cfa41967e041f (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.5' into tqtc/lts-5.15-opensourcev5.15.5-lts-lgpl
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
-rw-r--r--src/corelib/thread/qthreadpool.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index 93d0ffe695..7d98eea4ce 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -788,6 +788,7 @@ bool QThreadPool::contains(const QThread *thread) const
const QThreadPoolThread *poolThread = qobject_cast<const QThreadPoolThread *>(thread);
if (!poolThread)
return false;
+ QMutexLocker locker(&d->mutex);
return d->allThreads.contains(const_cast<QThreadPoolThread *>(poolThread));
}