diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-31 15:44:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-31 15:44:51 +0000 |
| commit | ad49361b303d1ceff7048fa0e89ba609ca9ce376 (patch) | |
| tree | be6413325604b0d403add54a8de6ea861ec90772 /src/wx | |
| parent | b2a9271256e09fcfedff3beea5fc73c04e7c0e14 (diff) | |
| parent | 5625ba9542e38504e87799dd655be5071161fb1f (diff) | |
Merge 1.0
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/wx_util.cc | 7 |
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 |
