diff --git a/CHANGELOG.md b/CHANGELOG.md index f81ca1a50..d4f14c5d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. - Zigbee extend timeout for MCU reboot from 5s to 10s (#22009) - Matter fix when Rules are disabled (#22016) - BearSSL panic on ESP8266 in rare conditions (#22017) +- Crash when calling TasmotaSerial destructor when initialized with incorrect arguments ### Removed diff --git a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp index 2200e06ba..ef8f87596 100644 --- a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp +++ b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp @@ -123,7 +123,9 @@ void TasmotaSerial::end(void) { } TasmotaSerial::~TasmotaSerial(void) { - end(); + if (m_valid) { + end(); + } } bool TasmotaSerial::isValidGPIOpin(int pin) {