diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-08-28 13:53:39 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-09-05 13:30:56 +0200 |
commit | 98e77113a2e8aedaf9ab1c85aa98f07ae7ffc29e (patch) | |
tree | 212bf47cd54aa76c173af132fbaf3884dd41c3fd /core | |
parent | 1fd87e8747cf1f76485d9e36a53ec70f6040168f (diff) | |
download | redot-engine-98e77113a2e8aedaf9ab1c85aa98f07ae7ffc29e.tar.gz |
ResourceLoader: Handle another case of user tokens
(cherry picked from commit 0441c67de67b3c84d57e8ade5f3a0fee70959338)
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_loader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 5204880d9d..149f382bf1 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -528,6 +528,11 @@ Ref<ResourceLoader::LoadToken> ResourceLoader::_load_start(const String &p_path, if (!ignoring_cache && thread_load_tasks.has(local_path)) { load_token = Ref<LoadToken>(thread_load_tasks[local_path].load_token); if (load_token.is_valid()) { + if (p_for_user) { + // Load task exists, with no user tokens at the moment. + // Let's "attach" to it. + _load_threaded_request_setup_user_token(load_token.ptr(), p_path); + } return load_token; } else { // The token is dying (reached 0 on another thread). |