diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-02-19 14:06:03 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-02-19 14:06:03 +0000 |
| commit | 8c397a895b1204473ebd8df5108563b1dd0a4e1c (patch) | |
| tree | 92e1d3dcf23b67af6e17cbe496c041e95525c908 /src/tools | |
| parent | 0eb86643c41928be07db6d494068114038c4cb27 (diff) | |
Fix crash when loading a non-existant DCP from history in the player.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 6e4f9960c..b2f95a20f 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -612,7 +612,11 @@ private: vector<boost::filesystem::path> history = Config::instance()->player_history (); int n = event.GetId() - ID_file_history; if (n >= 0 && n < static_cast<int> (history.size ())) { - load_dcp (history[n]); + try { + load_dcp (history[n]); + } catch (exception& e) { + error_dialog (0, std_to_wx(String::compose(wx_to_std(_("Could not load DCP %1.")), history[n])), std_to_wx(e.what())); + } } } |
