summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2020-07-02 19:22:09 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2020-07-02 19:22:09 +0200
commitfdf1977e8fe3683338dea68ff985bd511b86998f (patch)
treec968f96101c78d2062cbd4974b2aef9be5ce201f /scene/animation
parent719609522a30fa9e3b96b028ac5a1d1a65f1678f (diff)
Ignore blend times for inexistent animations
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 319d0171b3..caf9aa8dc8 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1055,6 +1055,8 @@ void AnimationPlayer::get_animation_list(List<StringName> *p_animations) const {
}
void AnimationPlayer::set_blend_time(const StringName &p_animation1, const StringName &p_animation2, float p_time) {
+ ERR_FAIL_COND(!animation_set.has(p_animation1));
+ ERR_FAIL_COND(!animation_set.has(p_animation2));
ERR_FAIL_COND_MSG(p_time < 0, "Blend time cannot be smaller than 0.");
BlendKey bk;