]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Partially applied patch [ 763900 ] fix for vertical toolbar
[wxWidgets.git] / src / common / appbase.cpp
index a43948154a9027fc35c3f9a5e93c4bd7d2a5c631..04304f3672b72fa59f1d1a39046f8fdc4d6ada8b 100644 (file)
@@ -262,11 +262,11 @@ void wxAppConsole::ProcessPendingEvents()
     }
 
     // iterate until the list becomes empty
-    wxNode *node = wxPendingEvents->GetFirst();
+    wxList::compatibility_iterator node = wxPendingEvents->GetFirst();
     while (node)
     {
         wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
-        delete node;
+        wxPendingEvents->Erase(node);
 
         // In ProcessPendingEvents(), new handlers might be add
         // and we can safely leave the critical section here.