Use get_node_or_null when null checks are present

Avoids duplicate or unnecessary errors
This commit is contained in:
Ninni Pipping
2023-06-05 14:56:54 +02:00
parent 37d1dfef9d
commit 0c16082e1e
7 changed files with 28 additions and 40 deletions

View File

@ -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);