Skip to content

Commit

Permalink
ResourceLoader: Handle another case of user tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Aug 28, 2024
1 parent 108c603 commit 0441c67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,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).
Expand Down

0 comments on commit 0441c67

Please sign in to comment.