aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-12-06 08:50:14 +0000
committerGuy Harris <guy@alum.mit.edu>2001-12-06 08:50:14 +0000
commit824071e92f3399da72423950727a6228fb4b4114 (patch)
tree1b6d1a09c5acb42a0f4664c8c4cd9a30c2232868
parent31519a0ff0bf1fe040a1ceefdcfe768d36ae2569 (diff)
Handle the case of the initial, or current, dissector handle for a
particular port number being null. svn path=/trunk/; revision=4347
-rw-r--r--gtk/decode_as_dlg.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c
index 7972a29037..5ca4a34168 100644
--- a/gtk/decode_as_dlg.c
+++ b/gtk/decode_as_dlg.c
@@ -1,6 +1,6 @@
/* decode_as_dlg.c
*
- * $Id: decode_as_dlg.c,v 1.18 2001/12/03 21:05:59 guy Exp $
+ * $Id: decode_as_dlg.c,v 1.19 2001/12/06 08:50:14 guy Exp $
*
* Routines to modify dissector tables on the fly.
*
@@ -243,9 +243,15 @@ decode_build_show_list (gchar *table_name, gpointer key,
clist = (GtkCList *)user_data;
current = dtbl_entry_get_handle(value);
- current_proto_name = dissector_handle_get_short_name(current);
+ if (current == NULL)
+ current_proto_name = "(none)";
+ else
+ current_proto_name = dissector_handle_get_short_name(current);
initial = dtbl_entry_get_initial_handle(value);
- initial_proto_name = dissector_handle_get_short_name(initial);
+ if (initial == NULL)
+ initial_proto_name = "(none)";
+ else
+ initial_proto_name = dissector_handle_get_short_name(initial);
text[E_CLIST_D_TABLE] = table_name;
sprintf(string1, "%d", GPOINTER_TO_INT(key));