Fix crash for union type formatting with unknown member (#3389)
This commit is contained in:
parent
c1edf60d3c
commit
51e5868575
1 changed files with 1 additions and 1 deletions
|
|
@ -2884,7 +2884,7 @@ static void base_type_to_format_unfold(const RzTypeDB *typedb, RZ_NONNULL RzBase
|
|||
rz_vector_foreach(&type->union_data.members, memb) {
|
||||
const char *membtype = type_to_identifier(typedb, memb->type);
|
||||
// Avoid infinite recursion in case of self-referential unions
|
||||
if (!strcmp(membtype, type->name)) {
|
||||
if (!membtype || !strcmp(membtype, type->name)) {
|
||||
continue;
|
||||
}
|
||||
if (rz_type_is_identifier(memb->type)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue