From 000caf4e871a9f27512ede9161a6d020bf6f8982 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Fri, 11 Sep 2015 21:30:38 +0200 Subject: [PATCH] shell: exit early if no IPv6 interface is found --- sys/shell/commands/sc_netif.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/shell/commands/sc_netif.c b/sys/shell/commands/sc_netif.c index 2196fa692..00b1d0fa2 100644 --- a/sys/shell/commands/sc_netif.c +++ b/sys/shell/commands/sc_netif.c @@ -326,6 +326,11 @@ static void _netif_list(kernel_pid_t dev) } #ifdef MODULE_GNRC_IPV6_NETIF + if (entry == NULL) { + puts(""); + return; + } + printf("Link type: %s", (entry->flags & GNRC_IPV6_NETIF_FLAGS_IS_WIRED) ? "wired" : "wireless"); printf("\n ");