aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-06-26 23:25:08 -0400
committerEvan Huus <eapache@gmail.com>2014-06-27 03:27:24 +0000
commit8d2eaaab51f0c64de0488b7b2b83cac7086628c1 (patch)
treea16e01fe7c4edf354a6263472fb6cb22b005a5ff /epan
parent1560b678ee2e6be572ccd433ceb4e25325c53474 (diff)
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 <eapache@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/print.c4
1 files changed, 4 insertions, 0 deletions
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;