Skip to content

Commit

Permalink
LwIpIntfDev.end() - check _started to prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
JAndrassy committed Jul 27, 2024
1 parent c2f1365 commit d03c98a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cores/esp8266/LwipIntfDev.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,12 @@ boolean LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu
template<class RawDev>
void LwipIntfDev<RawDev>::end()
{
netif_remove(&_netif);
_started = false;
RawDev::end();
if (_started)
{
netif_remove(&_netif);
_started = false;
RawDev::end();
}
}

template<class RawDev>
Expand Down

0 comments on commit d03c98a

Please sign in to comment.