Let read thread guards allow access to out-of-tree nodes

This commit is contained in:
Pedro J. Estébanez 2024-01-08 10:33:09 +01:00
parent 89cc635c05
commit 631d1e3a86

View File

@ -558,7 +558,9 @@ public:
_FORCE_INLINE_ bool is_readable_from_caller_thread() const {
if (current_process_thread_group == nullptr) {
// No thread processing.
return is_current_thread_safe_for_nodes();
// Only accessible if node is outside the scene tree
// or access will happen from a node-safe thread.
return !data.inside_tree || is_current_thread_safe_for_nodes();
} else {
// Thread processing.
return true;