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; }