From a426479b3f2594bc148e02f3f1e1dca1b4c5e97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Mon, 8 Jul 2024 12:19:44 +0200 Subject: [PATCH] ResourceLoader: Fix error message due to already-awaited tasks being re-awaited --- core/io/resource_loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index ab263d94855..20dd192da1a 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -688,6 +688,7 @@ Ref ResourceLoader::_load_complete_inner(LoadToken &p_load_token, Erro Error wtp_task_err = FAILED; if (loader_is_wtp) { // Loading thread is in the worker pool. + load_task.awaited = true; thread_load_mutex.unlock(); wtp_task_err = WorkerThreadPool::get_singleton()->wait_for_task_completion(load_task.task_id); } @@ -712,7 +713,6 @@ Ref ResourceLoader::_load_complete_inner(LoadToken &p_load_token, Erro } else { DEV_ASSERT(wtp_task_err == OK); thread_load_mutex.lock(); - load_task.awaited = true; } } else { // Loading thread is main or user thread.