diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-01-04 21:56:42 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-01-04 21:56:42 +0100 |
commit | 46ead9ece60a0959fab3c09bdade9fc4087118dc (patch) | |
tree | 317d06e4c1e4c3779c913c6e0307d4ec87e5284b | |
parent | 00acf1dd5ddab6a4c9a7e5aed97385ee2703a7e4 (diff) |
make sure to only call sub_handle_cap if it exists
-rw-r--r-- | packet-gsm_sim.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-gsm_sim.c b/packet-gsm_sim.c index a2bc97c..e416ac7 100644 --- a/packet-gsm_sim.c +++ b/packet-gsm_sim.c @@ -796,7 +796,8 @@ dissect_bertlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) subtvb = tvb_new_subset(tvb, pos, len, len); switch (tag) { case 0xD0: /* proactive command */ - call_dissector(sub_handle_cap, subtvb, pinfo, tree); + if (sub_handle_cap) + call_dissector(sub_handle_cap, subtvb, pinfo, tree); break; } @@ -930,7 +931,8 @@ dissect_gsm_apdu(guint8 ins, guint8 p1, guint8 p2, guint8 p3, break; case 0x14: /* TERMINAL RESPONSE */ subtvb = tvb_new_subset(tvb, offset+DATA_OFFS, p3, p3); - call_dissector(sub_handle_cap, subtvb, pinfo, tree); + if (sub_handle_cap) + call_dissector(sub_handle_cap, subtvb, pinfo, tree); break; case 0x70: /* MANAGE CHANNEL */ proto_tree_add_item(tree, hf_chan_op, tvb, offset-3, 1, ENC_BIG_ENDIAN); |