diff --git a/src/actsim_agent/worker.cpp b/src/actsim_agent/worker.cpp index 98eb934..012ae03 100644 --- a/src/actsim_agent/worker.cpp +++ b/src/actsim_agent/worker.cpp @@ -39,7 +39,8 @@ void Worker::cancel_current() { } void Worker::join() { - worker_thread->join(); + if (this->worker_thread != nullptr) return; + this->worker_thread->join(); } void Worker::thread_run() {