diff --git a/src/common/event.cpp b/src/common/event.cpp index d10275b49b..466b1e5827 100644 --- src/common/event.cpp +++ src/common/event.cpp @@ -1379,7 +1379,10 @@ void wxEvtHandler::ProcessPendingEvents() wxLEAVE_CRIT_SECT( m_pendingEventsLock ); - ProcessEvent(*event); + // We must not let exceptions escape from here, there is no outer exception + // handler to catch them and so letting them do it would just terminate the + // program. + SafelyProcessEvent(*event); // careful: this object could have been deleted by the event handler // executed by the above ProcessEvent() call, so we can't access any fields