aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-21 11:03:30 +0000
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-21 11:03:30 +0000
commit6e7ee075c43e91660a7335d327711220867454eb (patch)
tree924290365ef9fa9081ef7aede148bdd47a51aeb0 /print.c
parentbea2e9ffe1e81cf587d56453bb447f975870a75b (diff)
Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29490 f5534014-38df-0310-8fa8-9805f1628bb7
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;