]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appcmn.cpp
Applied patch #886192: "Minor fix to XRC contrib"; Minor cosmetic cleanups.
[wxWidgets.git] / src / common / appcmn.cpp
index d3d562d3e6324f41f1e23838a453e4dbbc1eabe6..c6e0fc945bdbb8abaac00f8d38701d6055c8db65 100644 (file)
@@ -140,10 +140,10 @@ void wxAppBase::CleanUp()
     delete wxTheColourDatabase;
     wxTheColourDatabase = NULL;
 
-#if wxUSE_THREADS
     delete wxPendingEvents;
     wxPendingEvents = NULL;
 
+#if wxUSE_THREADS
     delete wxPendingEventsLocker;
     wxPendingEventsLocker = NULL;
 
@@ -270,7 +270,7 @@ void wxAppBase::ExitMainLoop()
 #if wxUSE_EVTLOOP_IN_APP
     // we should exit from the main event loop, not just any currently active
     // (e.g. modal dialog) event loop
-    if ( m_mainLoop )
+    if ( m_mainLoop && m_mainLoop->IsRunning() )
     {
         m_mainLoop->Exit(0);
     }
@@ -583,11 +583,11 @@ void wxGUIAppTraitsBase::RemoveFromPendingDelete(wxObject *object)
 
 GSocketGUIFunctionsTable* wxGUIAppTraitsBase::GetSocketGUIFunctionsTable()
 {
-#ifdef __WXMAC__
-    // NB: wxMac does not have any GUI-specific functions in gsocket.c and
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+    // NB: wxMac CFM does not have any GUI-specific functions in gsocket.c and
     //     so it doesn't need this table at all
     return NULL;
-#else // !__WXMAC__
+#else // !__WXMAC__ || __DARWIN__
     static GSocketGUIFunctionsTable table =
     {
         _GSocket_GUI_Init,
@@ -602,7 +602,7 @@ GSocketGUIFunctionsTable* wxGUIAppTraitsBase::GetSocketGUIFunctionsTable()
         _GSocket_Disable_Events
     };
     return &table;
-#endif // __WXMAC__/!__WXMAC__
+#endif // !__WXMAC__ || __DARWIN__
 }
 
 #endif