diff options
-rw-r--r-- | src/status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/status.c b/src/status.c index 75ae9ec..bc910e8 100644 --- a/src/status.c +++ b/src/status.c @@ -88,7 +88,7 @@ static json_object * dump_stat(const fastd_stats_t *stats, fastd_stat_type_t typ /** Dumps a single traffic stat as a JSON object */ static json_object * dump_iface(const fastd_iface_t *iface) { - return iface->name ? json_object_new_string(iface->name) : NULL; + return (iface && iface->name) ? json_object_new_string(iface->name) : NULL; } /** Dumps a fastd_stats_t as a JSON object */ |