From d21835a61f5a39585c5fc6f176b88b4dbf60587e Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Tue, 2 Dec 2014 11:06:22 +0100 Subject: [PATCH] Don't do the debug printout if ipaddr is NULL --- core/net/ip/resolv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/net/ip/resolv.c b/core/net/ip/resolv.c index 8ada86897..5df53ecac 100644 --- a/core/net/ip/resolv.c +++ b/core/net/ip/resolv.c @@ -1380,7 +1380,8 @@ resolv_lookup(const char *name, uip_ipaddr_t ** ipaddr) #if VERBOSE_DEBUG switch (ret) { - case RESOLV_STATUS_CACHED:{ + case RESOLV_STATUS_CACHED: + if(ipaddr) { PRINTF("resolver: Found \"%s\" in cache.\n", name); const uip_ipaddr_t *addr = *ipaddr;