Merge pull request #83540 from mattbork/get_shallow_script_fix

Fix `GDScriptCache::get_full_script` eating parsing errors because of early exit
This commit is contained in:
Rémi Verschelde 2023-10-20 15:09:04 +02:00
commit 7270da76ba
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -287,7 +287,8 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
if (script.is_null()) {
script = get_shallow_script(p_path, r_error);
if (r_error) {
// Only exit early if script failed to load, otherwise let reload report errors.
if (script.is_null()) {
return script;
}
}