2
0
Fork 0

Merge pull request #53417 from vnen/gdscript-check-parser-ref-on-preload

4.0
Rémi Verschelde 2021-10-05 08:59:16 +07:00 committed by GitHub
commit e4e11e6a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

@ -3305,7 +3305,13 @@ GDScriptParser::DataType GDScriptAnalyzer::type_from_variant(const Variant &p_va
current = current->_owner;
}
Ref<GDScriptParserRef> ref = get_parser_for(current->path);
Ref<GDScriptParserRef> ref = get_parser_for(current->get_path());
if (ref.is_null()) {
push_error("Could not find script in path.", p_source);
GDScriptParser::DataType error_type;
error_type.kind = GDScriptParser::DataType::VARIANT;
return error_type;
}
ref->raise_status(GDScriptParserRef::INTERFACE_SOLVED);
GDScriptParser::ClassNode *found = ref->get_parser()->head;