diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index d9eca758..24a5f622 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -184,7 +184,7 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) #endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ /* no matching netif found, use default netif, if up */ - if (!netif_is_up(netif_default) || !netif_is_link_up(netif_default)) { + if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default)) { return NULL; } return netif_default;