From 5063450e489683e9ce90951614d64dbfffc9ae61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 16 May 2013 14:15:38 +0000 Subject: [PATCH] Lock m_critsect in POSIX wxThread::Create(). This is the documented behavior: all methods accessing m_internal should lock it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/threadpsx.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 952c77c9c7..cbb09b5251 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -1191,6 +1191,8 @@ wxThread::wxThread(wxThreadKind kind) wxThreadError wxThread::Create(unsigned int WXUNUSED_STACKSIZE(stackSize)) { + wxCriticalSectionLocker lock(m_critsect); + if ( m_internal->GetState() != STATE_NEW ) { // don't recreate thread -- 2.45.2