diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2022-03-12 09:33:11 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2022-03-12 09:46:51 +0300 |
commit | d009d96a9261a90d3879e519099ff5f286cd21c6 (patch) | |
tree | cb65bd2c31941b715f1600a7d94f22fe4436f9ba | |
parent | d5076439e44e6eab5732e1d2fc0f30bb6f34e5f9 (diff) |
Prevent crash due to empty error message on empty extends in GDScript
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 326720ce86..47de3d2685 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -277,6 +277,7 @@ Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class, base = parser->get_parser()->head->get_datatype(); } else { if (p_class->extends.is_empty()) { + push_error("Could not resolve an empty super class path.", p_class); return ERR_PARSE_ERROR; } const StringName &name = p_class->extends[extends_index++]; |