Skip to content

Commit

Permalink
ResourceLoader: Fixup resource changed feature
Browse files Browse the repository at this point in the history
This is a complement to: #96593
  • Loading branch information
RandomShaper committed Sep 6, 2024
1 parent 05d9854 commit ab29964
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,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;
Expand Down Expand Up @@ -855,6 +857,8 @@ Ref<Resource> ResourceLoader::_load_complete_inner(LoadToken &p_load_token, Erro
}
}

thread_load_mutex.lock();

return resource;
}

Expand Down

0 comments on commit ab29964

Please sign in to comment.