From 8d2eaaab51f0c64de0488b7b2b83cac7086628c1 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Thu, 26 Jun 2014 23:25:08 -0400 Subject: If we have no fields, don't try to iterate through them. Otherwise glib throws an assertion since the array we pass it is NULL. Change-Id: I9159c1f5ad99b280c040cd790df3cf352738601f Reviewed-on: https://code.wireshark.org/review/2680 Reviewed-by: Evan Huus --- epan/print.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'epan') diff --git a/epan/print.c b/epan/print.c index f4eb8818e0..ed75265180 100644 --- a/epan/print.c +++ b/epan/print.c @@ -1450,6 +1450,10 @@ output_fields_valid(output_fields_t *fields) { gboolean all_valid = TRUE; + if (fields->fields == NULL) { + return TRUE; + } + g_ptr_array_foreach(fields->fields, output_field_check, &all_valid); return all_valid; -- cgit v1.2.3