diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-21 11:03:30 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-21 11:03:30 +0000 |
commit | 27f7d88c840a704b1b41324ace2e0fd3c2806857 (patch) | |
tree | 924290365ef9fa9081ef7aede148bdd47a51aeb0 /plugins | |
parent | 1108352f008b3fb0e53c56110edc71af507734b0 (diff) |
Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
svn path=/trunk/; revision=29490
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wimax/packet-wmx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c index 5d2f1e9a68..784d9f89bf 100644 --- a/plugins/wimax/packet-wmx.c +++ b/plugins/wimax/packet-wmx.c @@ -642,6 +642,10 @@ proto_tree *add_tlv_subtree(tlv_info_t *this, gint idx, proto_tree *tree, int hf /* display the TLV name and display the value in hex. Highlight type, length, and value. */ tlv_item = proto_tree_add_item(tree, hfindex, tvb, start, tlv_value_length, little_endian); + + if (!PITEM_FINFO(tlv_item)) + return tree; + /* Correct the highlighting. */ PITEM_FINFO(tlv_item)->start -= tlv_val_offset; PITEM_FINFO(tlv_item)->length += tlv_val_offset; @@ -733,6 +737,10 @@ proto_tree *add_protocol_subtree(tlv_info_t *this, gint idx, proto_tree *tree, i message = se_strdup_vprintf(format, ap); va_end(ap); tlv_item = proto_tree_add_protocol_format(tree, hfindex, tvb, start, length, "%s", message); + + if (!PITEM_FINFO(tlv_item)) + return tree; + /* Correct the highlighting. */ PITEM_FINFO(tlv_item)->start -= tlv_val_offset; PITEM_FINFO(tlv_item)->length += tlv_val_offset; |