You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +00:00
Fix management of safe-for-nodes flag in ResourceLoader and WorkerThreadPool
This commit is contained in:
@@ -309,6 +309,10 @@ void ResourceLoader::_thread_load_function(void *p_userdata) {
|
||||
}
|
||||
// --
|
||||
|
||||
if (!Thread::is_main_thread()) {
|
||||
set_current_thread_safe_for_nodes(true);
|
||||
}
|
||||
|
||||
Ref<Resource> res = _load(load_task.remapped_path, load_task.remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, load_task.cache_mode, &load_task.error, load_task.use_sub_threads, &load_task.progress);
|
||||
if (mq_override) {
|
||||
mq_override->flush();
|
||||
|
||||
Reference in New Issue
Block a user