proto.c: exclude hf_text_only from proto_registrar_is_protocol()
This pseudo field is a specific case that is not linked to any protocol (despite parent being set to -1). This prevents a crash in Qt GUI when selecting a line added with proto_tree_add_subtree() or similar. Change-Id: I3b1cc2e6c7e71a71898f2ee9a02e9158eccf6fac Reviewed-on: https://code.wireshark.org/review/9845 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
37a1bb8ca4
commit
d12283b8e9
|
@ -7207,7 +7207,7 @@ proto_registrar_is_protocol(const int n)
|
|||
header_field_info *hfinfo;
|
||||
|
||||
PROTO_REGISTRAR_GET_NTH(n, hfinfo);
|
||||
return (hfinfo->parent == -1 ? TRUE : FALSE);
|
||||
return (((hfinfo->id != hf_text_only) && (hfinfo->parent == -1)) ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
/* Returns length of field in packet (not necessarily the length
|
||||
|
|
Loading…
Reference in New Issue