don't call proto_item_get_len() when the argument can be NULL

svn path=/trunk/; revision=53247
This commit is contained in:
Martin Kaiser 2013-11-11 10:57:30 +00:00
parent 77914468aa
commit 2759cfb9bd
1 changed files with 2 additions and 5 deletions

View File

@ -438,11 +438,8 @@ dissect_mongo_reply(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
static int
dissect_mongo_msg(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
proto_item *ti;
ti = proto_tree_add_item(tree, hf_mongo_message, tvb, offset, -1, ENC_ASCII|ENC_NA);
offset += proto_item_get_len(ti);
proto_tree_add_item(tree, hf_mongo_message, tvb, offset, -1, ENC_ASCII|ENC_NA);
offset += tvb_strsize(tvb, offset);
return offset;
}