aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sbus.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-11-04 11:27:04 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-11-04 11:27:04 +0000
commit51668ba0cab971a1a94d3f4c9939e01adf49b8b9 (patch)
tree9528ab83c032551117c1886e1790da2dafa36bc3 /epan/dissectors/packet-sbus.c
parent0b3ed37b63db5cecd130ac8da8643cd7297bfc2a (diff)
Added check for valid pointers.
svn path=/trunk/; revision=34775
Diffstat (limited to 'epan/dissectors/packet-sbus.c')
-rw-r--r--epan/dissectors/packet-sbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c
index 013c019321..94430d6dc6 100644
--- a/epan/dissectors/packet-sbus.c
+++ b/epan/dissectors/packet-sbus.c
@@ -930,7 +930,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(sbus_tree,
hf_sbus_command, tvb, offset, 1, FALSE);
offset += 1;
- if (request_val->retry_count > 0) {/*this is a retry telegram*/
+ if (request_val && request_val->retry_count > 0) {/*this is a retry telegram*/
hi = proto_tree_add_boolean(sbus_tree,
hf_sbus_retry, tvb, 0, 0, TRUE);
PROTO_ITEM_SET_GENERATED(hi);
@@ -942,7 +942,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(sbus_tree, hf_sbus_request_in, tvb, 0, 0,
request_val->req_frame);
}
- if (request_val->resp_frame > pinfo->fd->num){
+ if (request_val && request_val->resp_frame > pinfo->fd->num){
proto_tree_add_uint(sbus_tree, hf_sbus_response_in, tvb, 0, 0,
request_val->resp_frame);
}