diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_loader.cpp | 4 |
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; } |