From ad2c709374c2eb5c84b0adfc56eafa92ffeb0556 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 18 Nov 2023 14:50:54 +0000 Subject: [PATCH] Corrected seg fault when deactivating an AVR8 target in the absence of an AVR8 debug interface. --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 688ecac9..b44ab97c 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -240,6 +240,10 @@ namespace Targets::Microchip::Avr::Avr8Bit void Avr8::deactivate() { try { + if (this->avr8DebugInterface == nullptr) { + return; + } + this->stop(); this->clearAllBreakpoints();