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:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user