From: Carl Hetherington Date: Mon, 20 Jun 2016 16:16:20 +0000 (+0100) Subject: Merge branch 'fix-encoder-threading' of ssh://git.carlh.net/home/carl/git/dcpomatic... X-Git-Tag: v2.8.13~26 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=ad401edb701117f5aa6586239ef803b74ac3fb35;hp=41737ca62d65bcd6c25ec1080c0c7e0e6e6ae9b2;p=dcpomatic.git Merge branch 'fix-encoder-threading' of ssh://git.carlh.net/home/carl/git/dcpomatic into fix-encoder-threading --- diff --git a/src/lib/job.cc b/src/lib/job.cc index 75a5505a9..ba91debb7 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -62,8 +62,14 @@ Job::~Job () { if (_thread) { _thread->interrupt (); - DCPOMATIC_ASSERT (_thread->joinable ()); - _thread->join (); + /* We can't use DCPOMATIC_ASSERT here as it may throw an exception */ + if (_thread->joinable ()) { + try { + _thread->join (); + } catch (...) { + /* Too late to do anything about this */ + } + } } delete _thread;