diff options
author | ocean (they/them) <anvilfolk@gmail.com> | 2023-01-18 09:12:27 -0500 |
---|---|---|
committer | ocean (they/them) <anvilfolk@gmail.com> | 2023-01-18 09:35:48 -0500 |
commit | 4854e723be33cea4ebeb1aa697cb0a0d2aa1108f (patch) | |
tree | 5da1993f4b4ab30c3a11077de4bd5a0b2e16005b /modules/gdscript/gdscript_analyzer.cpp | |
parent | e514e3732a9588b650776cc962a9e4d8e6ded058 (diff) | |
download | redot-engine-4854e723be33cea4ebeb1aa697cb0a0d2aa1108f.tar.gz |
Fix unnammed enum crash regression
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index edd94da824..e04a962dcb 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -3171,7 +3171,7 @@ void GDScriptAnalyzer::reduce_identifier(GDScriptParser::IdentifierNode *p_ident for (int i = 0; i < current_enum->values.size(); i++) { const GDScriptParser::EnumNode::Value &element = current_enum->values[i]; if (element.identifier->name == p_identifier->name) { - StringName enum_name = current_enum->identifier->name ? current_enum->identifier->name : UNNAMED_ENUM; + StringName enum_name = current_enum->identifier ? current_enum->identifier->name : UNNAMED_ENUM; GDScriptParser::DataType type = make_enum_type(enum_name, parser->current_class->fqcn, false); if (element.parent_enum->identifier) { type.enum_type = element.parent_enum->identifier->name; |