Skip to content

Commit 5623f48

Browse files
committed
fix: It sometimes crashes after disable sntp
1 parent f537843 commit 5623f48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

third_party/lwip/core/sntp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,10 @@ sntp_dns_found(const char* hostname, ip_addr_t *ipaddr, void *arg)
919919
LWIP_UNUSED_ARG(hostname);
920920
LWIP_UNUSED_ARG(arg);
921921

922+
if (sntp_pcb == NULL) {
923+
return;
924+
}
925+
922926
if (ipaddr != NULL) {
923927
/* Address resolved, send request */
924928
LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_dns_found: Server address resolved, sending request\n"));

0 commit comments

Comments
 (0)