summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-20 23:25:30 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-20 23:25:30 +0100
commit190226098b818a8bed7d6ae9a77520300f5a28eb (patch)
treec7bf9056c9d30026cbec6718251ef282a0b0400d /modules/gdscript
parent82992523c033039b54c9b60694225d01ae4d89b6 (diff)
parent98ceb7ecf5fcf6d2fb00d2037aeec0dc67460145 (diff)
Merge pull request #68929 from adamscott/add-rename-check
Add `GDScriptCache::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 bf84e55b4c..add36591f3 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;
}