summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2023-01-04 11:41:11 +0100
committerGitHub <noreply@github.com>2023-01-04 11:41:11 +0100
commitdc3175e4cdb4e54e1c6200b6c4d07646eea95284 (patch)
tree823649259e633f2a00addf5451883d86cd07776f
parent00891066cb2c5e3c867feb97f3883f8ef4aad43d (diff)
parentc3f12592da89fc6c232fa592b7012493ee90e4d3 (diff)
Merge pull request #70810 from adamscott/cache-gdscript-even-when-error
Cache script when reloading even if there's errors
-rw-r--r--modules/gdscript/gdscript_cache.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp
index 6faf2dde73..ca0f77bc0a 100644
--- a/modules/gdscript/gdscript_cache.cpp
+++ b/modules/gdscript/gdscript_cache.cpp
@@ -298,13 +298,7 @@ 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);
- r_error = script->reload(true);
- if (r_error) {
- singleton->shallow_gdscript_cache[p_path] = script;
- singleton->full_gdscript_cache.erase(p_path);
- return script;
- }
-
+ script->reload(true);
return script;
}