diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-12 19:36:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-12 19:36:24 +0100 |
| commit | bf94224d1de3ab279fb6aab63b500fabec6bd5ec (patch) | |
| tree | 6c4593fbb0921562cb661d006c2bc5bef7024b7f /src/tools/dcpomatic_player.cc | |
| parent | 459bf3a7fa408bc90eca9eeb7fcd2bbb774e0668 (diff) | |
Fix crash when loading two players at the same time.
Diffstat (limited to 'src/tools/dcpomatic_player.cc')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 29195777e..2d27ba9d5 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -747,8 +747,14 @@ private: signal_manager = new wxSignalManager (this); - PlayServer* server = new PlayServer (_frame); - new thread (boost::bind (&PlayServer::run, server)); + try { + PlayServer* server = new PlayServer (_frame); + new thread (boost::bind (&PlayServer::run, server)); + } catch (...) { + /* Never mind; perhaps another player is already running + and listening for requests to play DCPs. + */ + } if (!_dcp_to_load.empty() && boost::filesystem::is_directory (_dcp_to_load)) { try { |
