summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index e56fe2c6ae..5c7642c26e 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -99,6 +99,8 @@ void qt_create_tls()
return;
static QBasicMutex mutex;
QMutexLocker locker(&mutex);
+ if (qt_current_thread_data_tls_index != TLS_OUT_OF_INDEXES)
+ return;
qt_current_thread_data_tls_index = TlsAlloc();
}