summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
authorNinni Pipping <over999ships@gmail.com>2023-06-05 14:56:54 +0200
committerNinni Pipping <over999ships@gmail.com>2023-06-10 13:22:56 +0200
commit0c16082e1e2030379039e0831cb26497d20b3720 (patch)
treea769795b86fe0af9f156533d707ffde6e93e62f2 /scene/animation/animation_player.cpp
parent37d1dfef9d81aade27ab0c56fc6b6f12f6a08045 (diff)
downloadredot-engine-0c16082e1e2030379039e0831cb26497d20b3720.tar.gz
Use `get_node_or_null` when null checks are present
Avoids duplicate or unnecessary errors
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index f95a7f98bb..0eb832a2dd 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -271,7 +271,7 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_ov
return;
}
- Node *parent = p_root_override ? p_root_override : get_node(root);
+ Node *parent = p_root_override ? p_root_override : get_node_or_null(root);
ERR_FAIL_NULL(parent);