X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37da386f77095543cf7740453455701ab65b5c94..76e36d433484b94cb5b7c3668fbce85ceebe508c:/src/mac/carbon/thread.cpp?ds=sidebyside diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index 3700a9a375..e54779628d 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -10,10 +10,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "thread.h" -#endif - // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- @@ -35,7 +31,7 @@ #include "wx/thread.h" #ifdef __WXMAC__ -#if TARGET_API_MAC_OSX +#ifdef __DARWIN__ #include #else #include @@ -1721,6 +1717,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 )