diff --git a/src/Application.cpp b/src/Application.cpp index 0eef2111..f6f52a6a 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -323,6 +323,10 @@ void Application::startTargetController() { } void Application::stopTargetController() { + if (this->targetController == nullptr) { + return; + } + auto targetControllerState = this->targetController->getThreadState(); if (targetControllerState == ThreadState::STARTING || targetControllerState == ThreadState::READY) { this->eventManager.triggerEvent(std::make_shared());