mirror of
https://github.com/godotengine/godot
synced 2024-09-05 17:02:29 +00:00
Fix crash while trying to autocomplete non-global Autoload
This commit is contained in:
parent
9904a9db5a
commit
e9a5beeb01
|
@ -2004,8 +2004,8 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check autoloads.
|
||||
if (ProjectSettings::get_singleton()->has_autoload(p_identifier)) {
|
||||
// Check global variables (including autoloads).
|
||||
if (GDScriptLanguage::get_singleton()->get_named_globals_map().has(p_identifier)) {
|
||||
r_type = _type_from_variant(GDScriptLanguage::get_singleton()->get_named_globals_map()[p_identifier]);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue