summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-08-28 10:36:09 +0200
committerGitHub <noreply@github.com>2020-08-28 10:36:09 +0200
commit46809332ddb108ad93aaa5df18f6ffc7bf65d432 (patch)
treee2108d40ee401ad78c343689ab9b4f54b1cc9b95 /modules/gdscript/gdscript.cpp
parent1ff139cb28137d5b1b492f74e5fc58cbeee01e4a (diff)
parent5033d5c71c1140262953c993568d48ed762648c5 (diff)
downloadredot-engine-46809332ddb108ad93aaa5df18f6ffc7bf65d432.tar.gz
Merge pull request #41547 from vnen/gdscript-2-fixes
Some more GDScript fixes
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 541d46a2af..0263e32c5b 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -603,10 +603,8 @@ Error GDScript::reload(bool p_keep_state) {
}
if (!source_path.empty()) {
MutexLock lock(GDScriptCache::singleton->lock);
- Ref<GDScript> self(this);
if (!GDScriptCache::singleton->shallow_gdscript_cache.has(source_path)) {
- GDScriptCache::singleton->shallow_gdscript_cache[source_path] = self;
- self->unreference();
+ GDScriptCache::singleton->shallow_gdscript_cache[source_path] = this;
}
}
}