From 006aeda0a970306da53d8289391a443bf72f1bc1 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Fri, 18 Nov 2016 10:49:28 -0500 Subject: [PATCH] Use SafelyProcessEvent --- src/widgets/AButton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/AButton.cpp b/src/widgets/AButton.cpp index f899294a9..da19a9657 100644 --- a/src/widgets/AButton.cpp +++ b/src/widgets/AButton.cpp @@ -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)