diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-10-01 14:41:34 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-10-01 14:41:34 +0000 |
commit | c500bfa99e1703b83e6b3d42c7f2ec3fcd7414c9 (patch) | |
tree | 980ccbedbdb62f5d2a92cdce5270681dbc85adc0 /gtk | |
parent | 8add9b33428c7d7a4d737f8304685ef8920369f5 (diff) |
Added check for valid pointers (to avoid warnings).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30234 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/main_proto_draw.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/gtk/main_proto_draw.c b/gtk/main_proto_draw.c index 79e4b6417b..a9106226ef 100644 --- a/gtk/main_proto_draw.c +++ b/gtk/main_proto_draw.c @@ -1506,20 +1506,22 @@ static void tree_cell_renderer(GtkTreeViewColumn *tree_column _U_, g_object_set (cell, "foreground-set", TRUE, NULL); } - if(fi->hfinfo->type == FT_PROTOCOL) { - g_object_set (cell, "background", "gray90", NULL); - g_object_set (cell, "background-set", TRUE, NULL); - g_object_set (cell, "foreground", "black", NULL); - g_object_set (cell, "foreground-set", TRUE, NULL); - /*g_object_set (cell, "weight", PANGO_WEIGHT_BOLD, NULL); - g_object_set (cell, "weight-set", TRUE, NULL);*/ - } - - if((fi->hfinfo->type == FT_FRAMENUM) || - (FI_GET_FLAG(fi, FI_URL) && IS_FT_STRING(fi->hfinfo->type))) { - render_as_url(cell); + if (fi && fi->hfinfo) { + if(fi->hfinfo->type == FT_PROTOCOL) { + g_object_set (cell, "background", "gray90", NULL); + g_object_set (cell, "background-set", TRUE, NULL); + g_object_set (cell, "foreground", "black", NULL); + g_object_set (cell, "foreground-set", TRUE, NULL); + /*g_object_set (cell, "weight", PANGO_WEIGHT_BOLD, NULL); + g_object_set (cell, "weight-set", TRUE, NULL);*/ + } + + if((fi->hfinfo->type == FT_FRAMENUM) || + (FI_GET_FLAG(fi, FI_URL) && IS_FT_STRING(fi->hfinfo->type))) { + render_as_url(cell); + } } - + if(FI_GET_FLAG(fi, PI_SEVERITY_MASK)) { switch(FI_GET_FLAG(fi, PI_SEVERITY_MASK)) { case(PI_CHAT): |