summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-08-21 11:03:30 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-08-21 11:03:30 +0000
commit27f7d88c840a704b1b41324ace2e0fd3c2806857 (patch)
tree924290365ef9fa9081ef7aede148bdd47a51aeb0 /print.c
parent1108352f008b3fb0e53c56110edc71af507734b0 (diff)
downloadwireshark-27f7d88c840a704b1b41324ace2e0fd3c2806857.tar.gz
Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
svn path=/trunk/; revision=29490
Diffstat (limited to 'print.c')
-rw-r--r--print.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/print.c b/print.c
index 921f41b10e..bd00687b51 100644
--- a/print.c
+++ b/print.c
@@ -157,6 +157,8 @@ void proto_tree_print_node(proto_node *node, gpointer data)
gchar label_str[ITEM_LABEL_LENGTH];
gchar *label_ptr;
+ g_assert(fi && "dissection with an invisible proto tree?");
+
/* Don't print invisible entries. */
if (PROTO_ITEM_IS_HIDDEN(node))
return;
@@ -266,10 +268,13 @@ proto_tree_write_node_pdml(proto_node *node, gpointer data)
char *dfilter_string;
size_t chop_len;
int i;
+ gboolean wrap_in_fake_protocol;
+
+ g_assert(fi && "dissection with an invisible proto tree?");
/* Will wrap up top-level field items inside a fake protocol wrapper to
preserve the PDML schema */
- gboolean wrap_in_fake_protocol =
+ wrap_in_fake_protocol =
(((fi->hfinfo->type != FT_PROTOCOL) ||
(fi->hfinfo->id == proto_data)) &&
(pdata->level == 0));
@@ -1417,6 +1422,8 @@ static void proto_tree_get_node_field_values(proto_node *node, gpointer data)
call_data = data;
fi = PNODE_FINFO(node);
+ g_assert(fi && "dissection with an invisible proto tree?");
+
field_index = g_hash_table_lookup(call_data->fields->field_indicies, fi->hfinfo->abbrev);
if(NULL != field_index) {
const gchar* value;