Merge pull request #59056 from Chaosus/gds_fix_extends_crash

This commit is contained in:
Yuri Rubinsky 2022-03-22 08:27:03 +03:00 committed by GitHub
commit 6cba2143de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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++];