summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-20 17:06:58 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-20 17:06:58 +0100
commit01884ed880e5519bd9d37db882216a81dfafdf8b (patch)
tree93e038c53ce7334a6268f12f9aebc40b23b6cdda /src/lib
parent795e5d916707da498acc7079ae1fb10aa6af6973 (diff)
Fix another case where an exception could be thrown from a destructor.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/job.cc10
1 files changed, 8 insertions, 2 deletions
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;