make sure we are getting the gui mutex before shutting down

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2004-05-29 19:43:32 +00:00
parent ac258944bc
commit bd24160658

View File

@ -1630,6 +1630,11 @@ void wxThreadModule::OnExit()
{
if ( gs_critsectGui )
{
if ( !wxGuiOwnedByMainThread() )
{
gs_critsectGui->Enter();
gs_bGuiOwnedByMainThread = true;
}
gs_critsectGui->Leave();
delete gs_critsectGui;
gs_critsectGui = NULL;