1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Add extra safety check

This commit is contained in:
smoogipoo 2021-09-14 17:47:12 +09:00
parent 63aa3ddcba
commit c009e1473d

View File

@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
if (noteAnimation is Sprite sprite)
texture = sprite.Texture;
else if (noteAnimation is TextureAnimation textureAnimation)
else if (noteAnimation is TextureAnimation textureAnimation && textureAnimation.FrameCount > 0)
texture = textureAnimation.CurrentFrame;
if (texture != null)