aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-10-12 08:16:50 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-10-12 08:16:50 +0000
commitec95db36a7ed4023f36e8316814c5e022843f287 (patch)
tree748ecccd4008a87463896cc9ce7350e9cacaee85 /epan
parent96b31924f058b4b744ce0a23f8dcc063518b160c (diff)
downloadwireshark-ec95db36a7ed4023f36e8316814c5e022843f287.tar.gz
wireshark-ec95db36a7ed4023f36e8316814c5e022843f287.tar.bz2
wireshark-ec95db36a7ed4023f36e8316814c5e022843f287.zip
Check for valid tree in proto_get_finfo_ptr_array() and
proto_tracking_interesting_fields(). This fixes a crash when using Lua script without packet list coloring. svn path=/trunk/; revision=30532
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 9a7bc775ea..09c9fd88d6 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5354,6 +5354,9 @@ proto_check_for_protocol_or_field(proto_tree* tree, int id)
GPtrArray*
proto_get_finfo_ptr_array(proto_tree *tree, int id)
{
+ if (!tree)
+ return NULL;
+
if (PTREE_DATA(tree)->interesting_hfids != NULL)
return g_hash_table_lookup(PTREE_DATA(tree)->interesting_hfids,
GINT_TO_POINTER(id));
@@ -5364,6 +5367,9 @@ proto_get_finfo_ptr_array(proto_tree *tree, int id)
gboolean
proto_tracking_interesting_fields(proto_tree *tree)
{
+ if (!tree)
+ return NULL;
+
return (PTREE_DATA(tree)->interesting_hfids != NULL);
}