Merge pull request #47064 from jmb462/fix-crash-in-uninitialized-AnimatedSprite2d-play
Fix crash on calling play() in a uninitialized AnimatedSprite2D (Fix #46013)
This commit is contained in:
commit
0615e55b27
@ -382,6 +382,7 @@ bool AnimatedSprite2D::_is_playing() const {
|
||||
}
|
||||
|
||||
void AnimatedSprite2D::play(const StringName &p_animation, const bool p_backwards) {
|
||||
ERR_FAIL_NULL_MSG(frames, "Can't play AnimatedSprite2D without a valid SpriteFrames resource.");
|
||||
backwards = p_backwards;
|
||||
|
||||
if (p_animation) {
|
||||
|
Loading…
Reference in New Issue
Block a user