diff --git a/ports/stm32/modnetwork.c b/ports/stm32/modnetwork.c index 0a0cd0e4a5..ea43f75573 100644 --- a/ports/stm32/modnetwork.c +++ b/ports/stm32/modnetwork.c @@ -57,7 +57,9 @@ STATIC void pyb_lwip_poll(void) { for (struct netif *netif = netif_list; netif != NULL; netif = netif->next) { if (netif->flags & NETIF_FLAG_LINK_UP) { mod_network_nic_type_t *nic = netif->state; - nic->poll_callback(nic, netif); + if (nic->poll_callback) { + nic->poll_callback(nic, netif); + } } } // Run the lwIP internal updates