1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Fix potential nullref if mods are never set

This commit is contained in:
Dean Herbert 2021-02-17 23:13:51 +09:00
parent 403536ef80
commit 3208b2c5bf

View File

@ -88,10 +88,13 @@ namespace osu.Game.Screens.Play.HUD
{
iconsContainer.Clear();
foreach (Mod mod in mods.NewValue)
iconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) });
if (mods.NewValue != null)
{
foreach (Mod mod in mods.NewValue)
iconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) });
appearTransform();
appearTransform();
}
}, true);
iconsContainer.FadeInFromZero(fade_duration, Easing.OutQuint);