summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-24 23:08:08 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-24 23:08:08 +0100
commit790db8faab093231664c402fcc33b0b96687e222 (patch)
tree1c45cb339bdb2a12b92e39ca17b27128832d9541
parent1437d38a988cffa5d56d1660e6525fde0f0406cb (diff)
Fix crash when starting two batch converters at the same time.
-rw-r--r--src/tools/dcpomatic_batch.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc
index dcda39fd8..6e054edf8 100644
--- a/src/tools/dcpomatic_batch.cc
+++ b/src/tools/dcpomatic_batch.cc
@@ -442,8 +442,12 @@ class App : public wxApp
}
_frame->Show ();
- auto server = new JobServer (_frame);
- new thread (boost::bind (&JobServer::run, server));
+ try {
+ auto server = new JobServer (_frame);
+ new thread (boost::bind (&JobServer::run, server));
+ } catch (boost::system::system_error& e) {
+ error_dialog(_frame, _("Could not listen for new batch jobs. Perhaps another instance of the DCP-o-matic Batch Converter is running."));
+ }
signal_manager = new wxSignalManager (this);
this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this));