From c794eada2880b08d70fce65c6e1cea61d2329373 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 23 Jun 2021 04:34:00 +0100 Subject: [PATCH] Fixed bug in shutdown routine that was resulting in a seg fault on shutdown, for certain commands. --- src/Application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Application.cpp b/src/Application.cpp index 38efee3a..597c58b1 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -227,7 +227,9 @@ void Application::shutdown() { this->stopDebugServer(); this->stopTargetController(); - if (this->signalHandler.getThreadState() != ThreadState::STOPPED) { + if (this->signalHandler.getThreadState() != ThreadState::STOPPED + && this->signalHandler.getThreadState() != ThreadState::UNINITIALISED + ) { // Signal handler is still running this->signalHandler.triggerShutdown();