projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c758226
)
Fix recently-introduced crash on double-terminating the Writer thread.
author
Carl Hetherington
<cth@carlh.net>
Sun, 12 Jan 2014 23:44:31 +0000
(23:44 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 12 Jan 2014 23:44:31 +0000
(23:44 +0000)
src/lib/writer.cc
patch
|
blob
|
history
diff --git
a/src/lib/writer.cc
b/src/lib/writer.cc
index 572a1c3a462d1ffa3f117b6b56378f82ae8435dc..7fd7464885303c5348df3d92b11a87ee9c0ebe65 100644
(file)
--- a/
src/lib/writer.cc
+++ b/
src/lib/writer.cc
@@
-344,6
+344,10
@@
void
Writer::terminate_thread (bool can_throw)
{
boost::mutex::scoped_lock lock (_mutex);
+ if (_thread == 0) {
+ return;
+ }
+
_finish = true;
_empty_condition.notify_all ();
_full_condition.notify_all ();