X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40f359cafed30dedf8d2dc7ff2c9b16fcc9bebdf..b39dbf34b887a73c525da903d8599f4f6b7eb8f9:/src/msw/thread.cpp diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 92f34c9ca8..df5f2f2ba7 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -629,6 +629,9 @@ void wxThreadInternal::SetPriority(unsigned int priority) bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize) { + wxASSERT_MSG( m_state == STATE_NEW && !m_hThread, + _T("Create()ing thread twice?") ); + // for compilers which have it, we should use C RTL function for thread // creation instead of Win32 API one because otherwise we will have memory // leaks if the thread uses C RTL (and most threads do) @@ -674,8 +677,6 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize) SetPriority(m_priority); } - m_state = STATE_NEW; - return TRUE; }