From e60b1a4c5addabc85bbe2fff685c28561941f8e1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 12 Jan 2014 23:44:31 +0000 Subject: Fix recently-introduced crash on double-terminating the Writer thread. --- src/lib/writer.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib') 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 (); -- cgit v1.2.3