Commit 969e9f2e authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Fix fatal crash if enduser_setup.stop() called twice.

parent a3d9d3ea
...@@ -332,6 +332,7 @@ static void enduser_setup_check_station_stop(void) ...@@ -332,6 +332,7 @@ static void enduser_setup_check_station_stop(void)
{ {
ENDUSER_SETUP_DEBUG(lua_getstate(), "enduser_setup_check_station_stop"); ENDUSER_SETUP_DEBUG(lua_getstate(), "enduser_setup_check_station_stop");
if (state != NULL)
os_timer_disarm(&(state->check_station_timer)); os_timer_disarm(&(state->check_station_timer));
} }
...@@ -1197,7 +1198,7 @@ static void enduser_setup_dns_stop(void) ...@@ -1197,7 +1198,7 @@ static void enduser_setup_dns_stop(void)
{ {
ENDUSER_SETUP_DEBUG(lua_getstate(), "enduser_setup_dns_stop"); 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); espconn_delete(state->espconn_dns_udp);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment