diff --git a/core/AmThread.cpp b/core/AmThread.cpp index ad08f7d6..887963e5 100644 --- a/core/AmThread.cpp +++ b/core/AmThread.cpp @@ -143,6 +143,11 @@ void AmThread::stop() { _m_td.lock(); + if(is_stopped()){ + _m_td.unlock(); + return; + } + // gives the thread a chance to clean up DBG("Thread %lu (%lu) calling on_stop, give it a chance to clean up.\n", (unsigned long int) _pid, (unsigned long int) _td);