diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index 2b9ed2aa8b..d47e100d0e 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -142,9 +142,9 @@ namespace osu.Game.Skinning }; } - var texture = GetTexture($"{componentName}-0"); + Texture texture; - if (texture != null && animatable) + if (animatable && (texture = GetTexture($"{componentName}-0")) != null) { var animation = new TextureAnimation { DefaultFrameLength = default_frame_time };