projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0eb8664
)
Fix crash when loading a non-existant DCP from history in the player.
author
Carl Hetherington
<cth@carlh.net>
Tue, 19 Feb 2019 14:06:03 +0000
(14:06 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 19 Feb 2019 14:06:03 +0000
(14:06 +0000)
src/tools/dcpomatic_player.cc
patch
|
blob
|
history
diff --git
a/src/tools/dcpomatic_player.cc
b/src/tools/dcpomatic_player.cc
index 6e4f9960c167feb5d71db5ccd258b5d26dce2829..b2f95a20f6f7c01a4052fe830ffe1828358c89df 100644
(file)
--- 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()));
+ }
}
}