1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-07 20:44:47 +08:00

Add extra safety check

This commit is contained in:
smoogipoo
2021-09-14 17:47:12 +09:00
Unverified
parent 63aa3ddcba
commit c009e1473d
@@ -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)