Fix fatal crash if enduser_setup.stop() called twice.
This commit is contained in:
parent
a3d9d3ea47
commit
969e9f2e90
|
@ -332,6 +332,7 @@ static void enduser_setup_check_station_stop(void)
|
|||
{
|
||||
ENDUSER_SETUP_DEBUG(lua_getstate(), "enduser_setup_check_station_stop");
|
||||
|
||||
if (state != NULL)
|
||||
os_timer_disarm(&(state->check_station_timer));
|
||||
}
|
||||
|
||||
|
@ -1197,7 +1198,7 @@ static void enduser_setup_dns_stop(void)
|
|||
{
|
||||
ENDUSER_SETUP_DEBUG(lua_getstate(), "enduser_setup_dns_stop");
|
||||
|
||||
if (state->espconn_dns_udp != NULL)
|
||||
if (state != NULL && state->espconn_dns_udp != NULL)
|
||||
{
|
||||
espconn_delete(state->espconn_dns_udp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue