You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable
This commit is contained in:
@@ -544,12 +544,12 @@ bool AnimationPlayer::is_valid() const {
|
||||
}
|
||||
|
||||
double AnimationPlayer::get_current_animation_position() const {
|
||||
ERR_FAIL_COND_V_MSG(!playback.current.from, 0, "AnimationPlayer has no current animation");
|
||||
ERR_FAIL_NULL_V_MSG(playback.current.from, 0, "AnimationPlayer has no current animation.");
|
||||
return playback.current.pos;
|
||||
}
|
||||
|
||||
double AnimationPlayer::get_current_animation_length() const {
|
||||
ERR_FAIL_COND_V_MSG(!playback.current.from, 0, "AnimationPlayer has no current animation");
|
||||
ERR_FAIL_NULL_V_MSG(playback.current.from, 0, "AnimationPlayer has no current animation.");
|
||||
return playback.current.from->animation->get_length();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user