From bd24160658c0e3d8971c7f65391ad18fa631ed64 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 29 May 2004 19:43:32 +0000 Subject: [PATCH] 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 --- src/mac/carbon/thread.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index f19bc74ca3..84de36ee2b 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -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; -- 2.45.2