diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-17 00:07:26 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-17 00:07:26 +0000 |
| commit | aae3734c4205a9151107ace1c61e6ffecc5afdad (patch) | |
| tree | 0c1d0c15caf8f72c48825abc276dfe606ca5587b /src/tools | |
| parent | dd353e14791138fc44b55b6f234567d706d313ff (diff) | |
Fix crash on loading non-existant DCP from recent menu.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 4388ebbc3..4425f34d1 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -145,7 +145,14 @@ public: void load_dcp (boost::filesystem::path dir) { _film.reset (new Film (optional<boost::filesystem::path>())); - shared_ptr<DCPContent> dcp (new DCPContent (_film, dir)); + shared_ptr<DCPContent> dcp; + try { + dcp.reset (new DCPContent (_film, dir)); + } catch (boost::filesystem::filesystem_error& e) { + error_dialog (this, _("Could not load DCP"), std_to_wx (e.what())); + return; + } + _film->examine_and_add_content (dcp, true); JobManager* jm = JobManager::instance (); |
