summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2022-11-20 15:21:57 -0500
committerAdam Scott <ascott.ca@gmail.com>2022-11-20 15:21:57 -0500
commit98ceb7ecf5fcf6d2fb00d2037aeec0dc67460145 (patch)
treeb76c78e3f665d8109d9e50e8925d34d0c0392f44 /modules/gdscript
parent98da707df5a40d37e85070cec6babfee4fae5765 (diff)
Add move_script check before executing logic
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp
index 00ae5f43c5..2fafb13211 100644
--- a/modules/gdscript/gdscript_cache.cpp
+++ b/modules/gdscript/gdscript_cache.cpp
@@ -122,7 +122,7 @@ GDScriptParserRef::~GDScriptParserRef() {
GDScriptCache *GDScriptCache::singleton = nullptr;
void GDScriptCache::move_script(const String &p_from, const String &p_to) {
- if (singleton == nullptr) {
+ if (singleton == nullptr || p_from == p_to) {
return;
}