diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2017-09-06 04:45:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 04:45:04 +0200 |
commit | 4d73b778f0e5266504c77641315edd3157afcc8e (patch) | |
tree | c8d28116d3fd75a1219f7dfb76993921ec5c217c /core/resource.cpp | |
parent | 308a6f4f99a5204682a2612d097e5c066f88196f (diff) | |
parent | 96b205d2edbd8f7379738c456d83ae831894eeb9 (diff) |
Merge pull request #11009 from neikeq/whateverr
Fixes ERR_EXPLAIN being overwritten
Diffstat (limited to 'core/resource.cpp')
-rw-r--r-- | core/resource.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/resource.cpp b/core/resource.cpp index 37d42226b4..78e20bada4 100644 --- a/core/resource.cpp +++ b/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); } } |