Fix Coverity CID 714130: Dereference after null check.

svn path=/trunk/; revision=44267
This commit is contained in:
Chris Maynard 2012-08-04 19:06:16 +00:00
parent 6b733f55bc
commit 3a95aea153
1 changed files with 4 additions and 2 deletions

View File

@ -235,8 +235,10 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf
}
proto_tree_add_bits_item(tree, hf_mac_ct, tvb, bitoffs, 4, ENC_BIG_ENDIAN);
bitoffs += 4;
temp = proto_tree_add_uint(tree, hf_mac_lch_id, tvb, 0, 0, rlcinf->rbid[fpinf->cur_tb]);
PROTO_ITEM_SET_GENERATED(temp);
if(rlcinf){
temp = proto_tree_add_uint(tree, hf_mac_lch_id, tvb, 0, 0, rlcinf->rbid[fpinf->cur_tb]);
PROTO_ITEM_SET_GENERATED(temp);
}
}
return bitoffs;
}