Skip to content
Snippets Groups Projects
Commit ac3e2f38 authored by Damien George's avatar Damien George
Browse files

stm32/modnetwork: Don't call NIC callback if it's NULL.

parent 08a24c5f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment