diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-12 23:44:31 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-12 23:44:31 +0000 |
| commit | e60b1a4c5addabc85bbe2fff685c28561941f8e1 (patch) | |
| tree | ab56698e259cf6d20dbe41bae3e679ac32ee91ce /src/lib | |
| parent | c758226b90f22b553725df2c7be4a3a42772ae54 (diff) | |
Fix recently-introduced crash on double-terminating the Writer thread.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/writer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 572a1c3a4..7fd746488 100644 --- 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 (); |
