From: Francesco Montorsi Date: Wed, 26 May 2010 22:44:13 +0000 (+0000) Subject: fix incoherency between the wxThread implementation based on MSW threads and pthread... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/363daf0bd1607e40246ebf265969d1e20aae1e90?ds=sidebyside fix incoherency between the wxThread implementation based on MSW threads and pthread: Delete()ing a thread which hasn't started yet must return wxTHREAD_MISC_ERROR git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 4583b6b868..95d8586f91 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -1476,6 +1476,11 @@ wxThreadError wxThread::Delete(ExitCode *rc) } //else: can't wait for detached threads } + + if (state == STATE_NEW) + return wxTHREAD_MISC_ERROR; + // for coherency with the MSW implementation, signal the user that + // Delete() was called on a thread which didn't start to run yet. return wxTHREAD_NO_ERROR; }