diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c index f38f6bbc66..825c567b26 100644 --- a/plugins/asn1/packet-asn1.c +++ b/plugins/asn1/packet-asn1.c @@ -4567,7 +4567,9 @@ getPDUprops(PDUprops *out, guint offset, guint class, guint tag, guint cons) if (asn1_verbose) g_message(" immediate choice [push], %c%d, %s", tag_class[info->tclass], info->tag, GETNAME); - pos.node = makechoice(pos.node, class, tag); + if (pos.node) { + pos.node = makechoice(pos.node, class, tag); + } if (pos.node == 0) { pos = POPSTATE; PDUerrcount++;