From d009d96a9261a90d3879e519099ff5f286cd21c6 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Sat, 12 Mar 2022 09:33:11 +0300 Subject: Prevent crash due to empty error message on empty extends in GDScript --- modules/gdscript/gdscript_analyzer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gdscript/gdscript_analyzer.cpp') 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++]; -- cgit v1.2.3