mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:07:25 +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)
|
if (noteAnimation is Sprite sprite)
|
||||||
texture = sprite.Texture;
|
texture = sprite.Texture;
|
||||||
else if (noteAnimation is TextureAnimation textureAnimation)
|
else if (noteAnimation is TextureAnimation textureAnimation && textureAnimation.FrameCount > 0)
|
||||||
texture = textureAnimation.CurrentFrame;
|
texture = textureAnimation.CurrentFrame;
|
||||||
|
|
||||||
if (texture != null)
|
if (texture != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user