diff options
Diffstat (limited to '')
-rw-r--r-- | epan/dissectors/packet-h265.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/epan/dissectors/packet-h265.c b/epan/dissectors/packet-h265.c index eb71ca5..cd0a048 100644 --- a/epan/dissectors/packet-h265.c +++ b/epan/dissectors/packet-h265.c @@ -801,18 +801,21 @@ dissect_h265_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, pack start_offset = *start_bit_offset >> 3; - if (hf_index > -1) + if (hf_index > -1) { hf_field = proto_registrar_get_nth(hf_index); + } - /* Allow only gint32 for se(v), guint32 for others. */ - switch (descriptor) { - case H265_SE_V: - DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_INT32); - break; + if (hf_field) { + /* Allow only gint32 for se(v), guint32 for others. */ + switch (descriptor) { + case H265_SE_V: + DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_INT32); + break; - default: - DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_UINT32); - break; + default: + DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_UINT32); + break; + } } bit_offset = *start_bit_offset; |