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
This commit is contained in:
Václav Slavík
2013-05-16 14:15:38 +00:00
parent 3942aa77f5
commit 5063450e48

View File

@@ -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