diff --git a/src/TargetController/TargetController.cpp b/src/TargetController/TargetController.cpp index e3354e69..942bf455 100644 --- a/src/TargetController/TargetController.cpp +++ b/src/TargetController/TargetController.cpp @@ -135,6 +135,8 @@ void TargetController::shutdown() { this->releaseHardware(); } catch (const std::exception& exception) { + this->target.reset(); + this->debugTool.reset(); Logger::error("Failed to properly shutdown TargetController. Error: " + std::string(exception.what())); }