summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/wx_util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 103d36d00..367d1edbb 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -140,11 +140,18 @@ ThreadedStaticText::~ThreadedStaticText ()
/** Run our thread and post the result to the GUI thread via AddPendingEvent */
void
ThreadedStaticText::run (function<string ()> fn)
+try
{
wxCommandEvent ev (wxEVT_COMMAND_TEXT_UPDATED, _update_event_id);
ev.SetString (std_to_wx (fn ()));
GetEventHandler()->AddPendingEvent (ev);
}
+catch (...)
+{
+ /* Ignore exceptions; marginally better than the program quitting, but
+ only marginally.
+ */
+}
/** Called in the GUI thread when our worker thread has finished */
void