Skip to content

Commit 7b40b23

Browse files
committed
Merge branch 'bugfix/fix_crash_when_clientdhcp_is_null' into 'master'
fix(tcpip_adapter): fix crash when clientdhcp is null See merge request sdk/ESP8266_RTOS_SDK!1518
2 parents adf9ee2 + 1833aa4 commit 7b40b23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/tcpip_adapter/tcpip_adapter_lwip.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static void tcpip_adapter_dhcpc_done(TimerHandle_t xTimer)
303303

304304
xTimerStop(dhcp_check_timer, 0);
305305
if (netif_is_up(esp_netif[TCPIP_ADAPTER_IF_STA])) {
306-
if (clientdhcp->state == DHCP_STATE_BOUND
306+
if ((clientdhcp && clientdhcp->state == DHCP_STATE_BOUND)
307307
#if LWIP_IPV4 && LWIP_AUTOIP
308308
|| (autoip && autoip->state == AUTOIP_STATE_ANNOUNCING)
309309
#endif

0 commit comments

Comments
 (0)