From f54043c214e8e79de9176be079731ecad3c6232a Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Sun, 17 Apr 2005 18:39:07 +0000 Subject: [PATCH] fix 10.2 shared builds from crashing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/appbase.cpp | 3 +++ src/mac/carbon/thread.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index ee78eb257c..118feac7ad 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -269,6 +269,9 @@ wxMessageOutput *wxAppConsole::CreateMessageOutput() void wxAppConsole::ProcessPendingEvents() { + if ( !wxPendingEventsLocker ) + return; + // ensure that we're the only thread to modify the pending events list wxENTER_CRIT_SECT( *wxPendingEventsLocker ); diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index 3700a9a375..cb8ecb4c2d 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -1721,6 +1721,9 @@ void WXDLLIMPEXP_BASE wxMutexGuiLeaveOrEnter() wxASSERT_MSG( wxThread::IsMain(), wxT("only main thread may call wxMutexGuiLeaveOrEnter()!") ); + if( !gs_critsectWaitingForGui ) + return; + wxCriticalSectionLocker enter(*gs_critsectWaitingForGui); if ( gs_nWaitingForGui == 0 ) -- 2.47.2