From 874970db9e78f130cd0d0d0270d60f156099e77f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 11 Dec 2014 09:33:07 +0100 Subject: [PATCH] Fix crash in ThreadPool::Stop fixes #8059 --- lib/base/threadpool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/base/threadpool.cpp b/lib/base/threadpool.cpp index 2a814134f..b39ad0d06 100644 --- a/lib/base/threadpool.cpp +++ b/lib/base/threadpool.cpp @@ -60,7 +60,8 @@ void ThreadPool::Stop(void) m_MgmtCV.notify_all(); } - m_MgmtThread.join(); + if (m_MgmtThread.joinable()) + m_MgmtThread.join(); for (size_t i = 0; i < sizeof(m_Queues) / sizeof(m_Queues[0]); i++) { boost::mutex::scoped_lock lock(m_Queues[i].Mutex);