From 27272de6239aed1b117343bd1450659944a8c751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Andr=C3=A1ssy?= <10706773+JAndrassy@users.noreply.github.com> Date: Wed, 31 Jul 2024 04:53:39 +0200 Subject: [PATCH] LwIpIntfDev.end() - check _started to prevent crash (#9173) --- cores/esp8266/LwipIntfDev.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/LwipIntfDev.h b/cores/esp8266/LwipIntfDev.h index 962d5e119..d69e2d73d 100644 --- a/cores/esp8266/LwipIntfDev.h +++ b/cores/esp8266/LwipIntfDev.h @@ -349,9 +349,12 @@ boolean LwipIntfDev::begin(const uint8_t* macAddress, const uint16_t mtu template void LwipIntfDev::end() { - netif_remove(&_netif); - _started = false; - RawDev::end(); + if (_started) + { + netif_remove(&_netif); + _started = false; + RawDev::end(); + } } template