Don't crash when waiting for thread termination in wxMSW.
The changes of r65882 adding wxThread::On{Delete,Kill}() introduced a bug which made normal wxThread::Wait() crash. Fix it by calling OnDelete() only if we're really deleting a thread. Closed #12627, see #9046. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
24d7c81c32
commit
486fa39656
@ -761,7 +761,8 @@ wxThreadInternal::WaitForTerminate(wxCriticalSection& cs,
|
|||||||
Cancel();
|
Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
threadToDelete->OnDelete();
|
if ( threadToDelete )
|
||||||
|
threadToDelete->OnDelete();
|
||||||
|
|
||||||
// now wait for thread to finish
|
// now wait for thread to finish
|
||||||
if ( wxThread::IsMain() )
|
if ( wxThread::IsMain() )
|
||||||
|
Loading…
Reference in New Issue
Block a user