]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/thread.cpp
removed USE_SHARED_LIBRARY mentions (and all variations in spelling) (patch 1231184)
[wxWidgets.git] / src / mac / carbon / thread.cpp
index 3700a9a375845a004f49ae571596eb86d267e22c..bbfafd4b38cc8f0dca4637d941f081988ec2fdd1 100644 (file)
@@ -35,7 +35,7 @@
 #include "wx/thread.h"
 
 #ifdef __WXMAC__
-#if TARGET_API_MAC_OSX
+#ifdef __DARWIN__
 #include <CoreServices/CoreServices.h>
 #else
 #include <DriverServices.h>
@@ -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 )