]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxUSE_THREADS guards
authorJulian Smart <julian@anthemion.co.uk>
Mon, 18 Apr 2005 16:32:34 +0000 (16:32 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 18 Apr 2005 16:32:34 +0000 (16:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/appbase.cpp

index 118feac7adbf3aaf5485c211920827c49b6bb642..8dec8e8a922f7ff0fc7281f914583c4c17d55b40 100644 (file)
@@ -269,6 +269,7 @@ wxMessageOutput *wxAppConsole::CreateMessageOutput()
 
 void wxAppConsole::ProcessPendingEvents()
 {
 
 void wxAppConsole::ProcessPendingEvents()
 {
+#if wxUSE_THREADS
     if ( !wxPendingEventsLocker )
         return;
     
     if ( !wxPendingEventsLocker )
         return;
     
@@ -280,6 +281,7 @@ void wxAppConsole::ProcessPendingEvents()
         wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
         return;
     }
         wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
         return;
     }
+#endif
 
     // iterate until the list becomes empty
     wxList::compatibility_iterator node = wxPendingEvents->GetFirst();
 
     // iterate until the list becomes empty
     wxList::compatibility_iterator node = wxPendingEvents->GetFirst();
@@ -288,16 +290,24 @@ void wxAppConsole::ProcessPendingEvents()
         wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
         wxPendingEvents->Erase(node);
 
         wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
         wxPendingEvents->Erase(node);
 
+#if wxUSE_THREADS
         // In ProcessPendingEvents(), new handlers might be add
         // and we can safely leave the critical section here.
         wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
         // In ProcessPendingEvents(), new handlers might be add
         // and we can safely leave the critical section here.
         wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
+#endif
+        
         handler->ProcessPendingEvents();
         handler->ProcessPendingEvents();
+
+#if wxUSE_THREADS
         wxENTER_CRIT_SECT( *wxPendingEventsLocker );
         wxENTER_CRIT_SECT( *wxPendingEventsLocker );
+#endif
 
         node = wxPendingEvents->GetFirst();
     }
 
 
         node = wxPendingEvents->GetFirst();
     }
 
+#if wxUSE_THREADS
     wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
     wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
+#endif
 }
 
 int wxAppConsole::FilterEvent(wxEvent& WXUNUSED(event))
 }
 
 int wxAppConsole::FilterEvent(wxEvent& WXUNUSED(event))