Răsfoiți Sursa

Fixes ERR_EXPLAIN being overwritten

Ignacio Etcheverry 8 ani în urmă
părinte
comite
96b205d2ed
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      core/resource.cpp

+ 1 - 2
core/resource.cpp

@@ -69,12 +69,11 @@ void Resource::set_path(const String &p_path, bool p_take_over) {
 			ResourceCache::resources.get(p_path)->set_name("");
 			ResourceCache::lock->write_unlock();
 		} else {
-			ERR_EXPLAIN("Another resource is loaded from path: " + p_path);
-
 			ResourceCache::lock->read_lock();
 			bool exists = ResourceCache::resources.has(p_path);
 			ResourceCache::lock->read_unlock();
 
+			ERR_EXPLAIN("Another resource is loaded from path: " + p_path);
 			ERR_FAIL_COND(exists);
 		}
 	}