forked from osmocom/wireshark
Bugfix for proto_item_get_subtree()
Not all proto_item* fields have a subtree associated to it. If it doesnt have a subtree fi will be NULL, test fi for NULL before trying to dereference it to avoid a coredump. svn path=/trunk/; revision=14134
This commit is contained in:
parent
68928a2e81
commit
c27c30ba02
|
@ -2448,7 +2448,7 @@ proto_item_get_subtree(proto_item *pi) {
|
|||
if (!pi)
|
||||
return(NULL);
|
||||
fi = PITEM_FINFO(pi);
|
||||
if (fi->tree_type == -1)
|
||||
if ( (!fi) || (fi->tree_type == -1) )
|
||||
return(NULL);
|
||||
return (proto_tree*) pi;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue