projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
795e5d9
)
Fix another case where an exception could be thrown from a destructor.
author
Carl Hetherington
<cth@carlh.net>
Mon, 20 Jun 2016 16:06:58 +0000
(17:06 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 20 Jun 2016 16:06:58 +0000
(17:06 +0100)
src/lib/job.cc
patch
|
blob
|
history
diff --git
a/src/lib/job.cc
b/src/lib/job.cc
index 75a5505a95d82c1e4e738b802cb739bc16c0d40f..ba91debb79f7565e956196604468ec52985b5610 100644
(file)
--- 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;