From: Václav Slavík Date: Wed, 23 Jan 2008 22:31:04 +0000 (+0000) Subject: catch exceptions when sending menu events X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/147e8ebc058cf2986d977388fa3861d8b3ceca93?ds=inline catch exceptions when sending menu events git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index d7ae6c33d2..e97a419bd6 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -452,7 +452,7 @@ bool wxMenuBase::SendEvent(int id, int checked) { wxEvtHandler *handler = GetEventHandler(); if ( handler ) - processed = handler->ProcessEvent(event); + processed = handler->SafelyProcessEvent(event); } // Try the window the menu was popped up from (and up through the @@ -465,7 +465,7 @@ bool wxMenuBase::SendEvent(int id, int checked) wxWindow *win = menu->GetInvokingWindow(); if ( win ) { - processed = win->GetEventHandler()->ProcessEvent(event); + processed = win->GetEventHandler()->SafelyProcessEvent(event); break; }