Explorar el Código

Add move_script check before executing logic

Adam Scott hace 2 años
padre
commit
98ceb7ecf5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;
 	}