From: Václav Slavík Date: Thu, 16 May 2013 14:15:38 +0000 (+0000) Subject: Lock m_critsect in POSIX wxThread::Create(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5063450e489683e9ce90951614d64dbfffc9ae61?ds=inline 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 --- 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