summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2024-09-06 17:43:05 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2024-09-23 18:55:54 +0200
commit251237d2b4021b9cdd25c644cf13061b98b0d0ab (patch)
tree0a08f017668f9c65a4eabe3f98930783a5b5321c /core
parentea651a150b27302626ac9174e2209a1029576e21 (diff)
downloadredot-engine-251237d2b4021b9cdd25c644cf13061b98b0d0ab.tar.gz
ResourceLoader: Fixup resource changed feature
This is a complement to: https://github.com/godotengine/godot/pull/96593 (cherry picked from commit 97197ff5e9c73ffbb2e3822d40a63bc3f8c47373)
Diffstat (limited to 'core')
-rw-r--r--core/io/resource_loader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 5c14661eac..5f578dbeec 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -826,6 +826,8 @@ Ref<Resource> ResourceLoader::_load_complete_inner(LoadToken &p_load_token, Erro
load_task_ptr = &load_task;
}
+ thread_load_mutex.unlock();
+
Ref<Resource> resource = load_task_ptr->resource;
if (r_error) {
*r_error = load_task_ptr->error;
@@ -863,6 +865,8 @@ Ref<Resource> ResourceLoader::_load_complete_inner(LoadToken &p_load_token, Erro
}
}
+ thread_load_mutex.lock();
+
return resource;
}