Use SafelyProcessEvent

This commit is contained in:
Paul Licameli 2016-11-18 10:49:28 -05:00
parent 8e5975b10d
commit 006aeda0a9
1 changed files with 3 additions and 1 deletions

View File

@ -563,7 +563,9 @@ void AButton::Click()
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
// Be sure to use SafelyProcessEvent so that exceptions do not propagate
// out of DoDefaultAction
GetEventHandler()->SafelyProcessEvent(event);
}
void AButton::SetShift(bool shift)