X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..9572bf1d442006beba3528dc00c3fc05eb523c24:/src/msw/thread.cpp diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 6fe0d3bca0..58715647ce 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -1077,11 +1077,8 @@ wxThreadError wxThread::Run() { wxCriticalSectionLocker lock(m_critsect); - if ( m_internal->GetState() != STATE_NEW ) - { - // actually, it may be almost any state at all, not only STATE_RUNNING - return wxTHREAD_RUNNING; - } + wxCHECK_MSG( m_internal->GetState() == STATE_NEW, wxTHREAD_RUNNING, + wxT("thread may only be started once after Create()") ); // the thread has just been created and is still suspended - let it run return Resume();