diff --git a/src/core/stats.c b/src/core/stats.c index 95445ec9..e3ba898f 100644 --- a/src/core/stats.c +++ b/src/core/stats.c @@ -116,7 +116,11 @@ void stats_display_memp(struct stats_mem *mem, int idx) { if (idx < MEMP_MAX) { - stats_display_mem(mem, mem->name); + if (mem == NULL) { + LWIP_PLATFORM_DIAG(("\nMEMP[%d]: NULL\n", idx)); + } else { + stats_display_mem(mem, mem->name); + } } } #endif /* MEMP_STATS */