1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #24489 from mateusfccp/18264_wrong_animation_error

Make AnimatedSprite.animation complain when invalid animation name
This commit is contained in:
Hein-Pieter van Braam
2019-04-23 06:36:32 +03:00
committed by GitHub

View File

@@ -645,6 +645,9 @@ void AnimatedSprite::_reset_timeout() {
void AnimatedSprite::set_animation(const StringName &p_animation) {
ERR_EXPLAIN(vformat("There is no animation with name '%s'.", p_animation));
ERR_FAIL_COND(frames->get_animation_names().find(p_animation) == -1);
if (animation == p_animation)
return;