diff options
-rw-r--r-- | epan/proto.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 424cd4f6e0..89c46c5096 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -5443,7 +5443,11 @@ proto_item_set_end(proto_item *pi, tvbuff_t *tvb, gint end) int proto_item_get_len(const proto_item *pi) { - field_info *fi = PITEM_FINFO(pi); + field_info *fi; + + if (!pi) + return -1; + fi = PITEM_FINFO(pi); return fi ? fi->length : -1; } |