Merge pull request #79163 from anvilfolk/fullscripterror

GDScript: Add static analysis error reporting in GDScriptCache::get_full_script()
This commit is contained in:
Yuri Sizov 2023-07-14 18:49:32 +02:00
commit d5a30f7af8

View File

@ -294,8 +294,12 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
if (p_update_from_disk) {
r_error = script->load_source_code(p_path);
if (r_error) {
return script;
}
}
r_error = script->reload(true);
if (r_error) {
return script;
}
@ -303,7 +307,6 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
singleton->full_gdscript_cache[p_path] = script;
singleton->shallow_gdscript_cache.erase(p_path);
script->reload(true);
return script;
}