diff options
author | Travis Lange <travislange12@gmail.com> | 2024-02-19 09:29:36 -0500 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-19 16:50:19 +0100 |
commit | ae97cf2ff01a385d6eeb2ff866ad5d6f8e8fae16 (patch) | |
tree | 21aaa50625d8728176ca8fb4a86358f7066ad430 /scene/main/node.cpp | |
parent | 0246230e2b7c542f003c3c53cffc22dedc0c9c50 (diff) | |
download | redot-engine-ae97cf2ff01a385d6eeb2ff866ad5d6f8e8fae16.tar.gz |
Fix AnimationMixer breaking animations with redundant check
Also change `Node::get_node_and_resource` to prevent it from printing an
error from `Node::get_node`, and just returns nullptr. This is what the
redundant check was trying to prevent.
Fixes #88428.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r-- | scene/main/node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index e814e4f0cd..f827f68def 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -3025,9 +3025,9 @@ Array Node::_get_node_and_resource(const NodePath &p_path) { Node *Node::get_node_and_resource(const NodePath &p_path, Ref<Resource> &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property) const { ERR_THREAD_GUARD_V(nullptr); - Node *node = get_node(p_path); r_res = Ref<Resource>(); r_leftover_subpath = Vector<StringName>(); + Node *node = get_node_or_null(p_path); if (!node) { return nullptr; } |