diff --git a/scene/main/node.h b/scene/main/node.h index 6b937244780..ee195ddef96 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -596,7 +596,7 @@ public: // No thread processing. // 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(); + return is_current_thread_safe_for_nodes() || unlikely(!data.inside_tree); } else { // Thread processing. return true;