diff --git a/src/OpenThreads/pthreads/PThread.c++ b/src/OpenThreads/pthreads/PThread.c++ index 07c99730e..c6a732367 100644 --- a/src/OpenThreads/pthreads/PThread.c++ +++ b/src/OpenThreads/pthreads/PThread.c++ @@ -421,6 +421,7 @@ Thread::~Thread() Thread *Thread::CurrentThread() { + if(!s_isInitialized) Thread::Init(); Thread *thread = static_cast(pthread_getspecific(PThreadPrivateData::s_tls_key));