Add a null pointer check.

While we're at it, fix a typo in a comment.

Bug: 13711
Change-Id: Ie1e4aa9243ccb10621bf181b232e177c2a7f867c
Reviewed-on: https://code.wireshark.org/review/21676
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-05-15 16:11:22 -07:00
parent b960f5f4c2
commit 4988cca14d
1 changed files with 3 additions and 2 deletions

View File

@ -541,7 +541,8 @@ dissect_wlan_radio_phdr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* go back to the first frame in the aggregate,
* and mark it as part of this aggregate */
previous_frame.radio_info->aggregate = current_aggregate;
if (previous_frame.radio_info != NULL)
previous_frame.radio_info->aggregate = current_aggregate;
}
wlan_radio_info->aggregate = current_aggregate;
@ -569,7 +570,7 @@ dissect_wlan_radio_phdr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
previous_frame.tsf_timestamp = phdr->tsf_timestamp;
previous_frame.phy = phdr->phy;
} else {
/* this frame has already been seen, so get it's info structure */
/* this frame has already been seen, so get its info structure */
wlan_radio_info = (struct wlan_radio *) p_get_proto_data(wmem_file_scope(), pinfo, proto_wlan_radio, 0);
if (wlan_radio_info->aggregate) {