diff options
author | Ninni Pipping <over999ships@gmail.com> | 2023-06-06 14:59:54 +0200 |
---|---|---|
committer | Ninni Pipping <over999ships@gmail.com> | 2023-06-10 08:56:30 +0200 |
commit | dcd2b883eb1af68c4fdb5993a19126e1d6d4ba82 (patch) | |
tree | a3ebb53906a6b45204d3d43762ab060f74fcde90 /scene/animation/animation_player.cpp | |
parent | 9723077f4f91598152013b02b6c7d0576c74b319 (diff) | |
download | redot-engine-dcd2b883eb1af68c4fdb5993a19126e1d6d4ba82.tar.gz |
Use NULL instead of COND checks when appropriate
Restricted to scene
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r-- | scene/animation/animation_player.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index ebf5d03a76..f95a7f98bb 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -273,7 +273,7 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_ov Node *parent = p_root_override ? p_root_override : get_node(root); - ERR_FAIL_COND(!parent); + ERR_FAIL_NULL(parent); Animation *a = p_anim->animation.operator->(); @@ -2169,7 +2169,7 @@ Ref<AnimatedValuesBackup> AnimationPlayer::apply_reset(bool p_user_initiated) { ERR_FAIL_COND_V(reset_anim.is_null(), Ref<AnimatedValuesBackup>()); Node *root_node = get_node_or_null(root); - ERR_FAIL_COND_V(!root_node, Ref<AnimatedValuesBackup>()); + ERR_FAIL_NULL_V(root_node, Ref<AnimatedValuesBackup>()); AnimationPlayer *aux_player = memnew(AnimationPlayer); EditorNode::get_singleton()->add_child(aux_player); |