X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cd6a9ad50c00a94e62558a3b55e814028d81100..0e20728015df8aa82bcfa7d9c220b73b82f8c194:/src/common/event.cpp?ds=sidebyside diff --git a/src/common/event.cpp b/src/common/event.cpp index 69abfcc2bb..817f40e4a8 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1187,7 +1187,17 @@ void wxEvtHandler::ProcessPendingEvents() // if there are no more pending events left, we don't need to stay in this // list if ( m_pendingEvents->IsEmpty() ) + { +#if wxUSE_THREADS + if (wxPendingEventsLocker) + wxENTER_CRIT_SECT(*wxPendingEventsLocker); +#endif wxPendingEvents->DeleteObject(this); +#if wxUSE_THREADS + if (wxPendingEventsLocker) + wxLEAVE_CRIT_SECT(*wxPendingEventsLocker); +#endif + } wxLEAVE_CRIT_SECT( m_pendingEventsLock );