summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;