X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a625f4544244ed98649e01227586cfa61c221225..8f9d20d16f54a088aea5fb5e826bf1690efac2ff:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index ee78eb257c..3901c4def1 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -269,6 +269,11 @@ wxMessageOutput *wxAppConsole::CreateMessageOutput() void wxAppConsole::ProcessPendingEvents() { +#if wxUSE_THREADS + if ( !wxPendingEventsLocker ) + return; +#endif + // ensure that we're the only thread to modify the pending events list wxENTER_CRIT_SECT( *wxPendingEventsLocker ); @@ -288,7 +293,9 @@ void wxAppConsole::ProcessPendingEvents() // In ProcessPendingEvents(), new handlers might be add // and we can safely leave the critical section here. wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); + handler->ProcessPendingEvents(); + wxENTER_CRIT_SECT( *wxPendingEventsLocker ); node = wxPendingEvents->GetFirst();