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