]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
replace wrong wxUSE_DYNAMIC_LOADER test with the correct wxUSE_DYNLIB_CLASS one
[wxWidgets.git] / src / common / event.cpp
index 69abfcc2bb9b50d705a542d4c0311f54d30e3a21..817f40e4a896829f7105c8bd96c072d1d68a58f2 100644 (file)
@@ -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 );