catch exceptions when sending menu events

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-01-23 22:31:04 +00:00
parent 4a9dc87b27
commit 147e8ebc05

View File

@@ -452,7 +452,7 @@ bool wxMenuBase::SendEvent(int id, int checked)
{ {
wxEvtHandler *handler = GetEventHandler(); wxEvtHandler *handler = GetEventHandler();
if ( handler ) if ( handler )
processed = handler->ProcessEvent(event); processed = handler->SafelyProcessEvent(event);
} }
// Try the window the menu was popped up from (and up through the // 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(); wxWindow *win = menu->GetInvokingWindow();
if ( win ) if ( win )
{ {
processed = win->GetEventHandler()->ProcessEvent(event); processed = win->GetEventHandler()->SafelyProcessEvent(event);
break; break;
} }