]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/thread.cpp
cleanup - reformat; added (disabled) support for secondary highlight color
[wxWidgets.git] / src / mac / carbon / thread.cpp
index 3700a9a375845a004f49ae571596eb86d267e22c..e54779628dffe727512d07575f9dc41b3255fe00 100644 (file)
 // 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 <CoreServices/CoreServices.h>
 #else
 #include <DriverServices.h>
@@ -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 )