From 4a5ddb1a4b46baa5dfd45cba8f2e328a6b831d1d Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 2 Jan 2022 21:30:24 +0000 Subject: [PATCH] Fixed regression for better accommodation of TargetController lazy loading --- src/Application.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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());