瀏覽代碼

Merge pull request #68929 from adamscott/add-rename-check

Add `GDScriptCache::move_script` check before executing logic
Rémi Verschelde 2 年之前
父節點
當前提交
190226098b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/gdscript/gdscript_cache.cpp

+ 1 - 1
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;
 	}