From d03c98a08a53d9ed9601a0c626368f88b51857ea Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Sat, 27 Jul 2024 18:39:33 +0200 Subject: [PATCH] LwIpIntfDev.end() - check _started to prevent crash --- 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 962d5e1196..d69e2d73d8 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