From 1d7b8ea21a88f1eabe104ffd9c8d1c851813c5f1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 6 Oct 2023 16:51:40 +0900 Subject: [PATCH] Fix incorrect implementation of `IHasCurrentValue` in `FooterButtonFreeMods` --- osu.Game/Screens/OnlinePlay/FooterButtonFreeMods.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/FooterButtonFreeMods.cs b/osu.Game/Screens/OnlinePlay/FooterButtonFreeMods.cs index 3825cf18b9..54cd36d05b 100644 --- a/osu.Game/Screens/OnlinePlay/FooterButtonFreeMods.cs +++ b/osu.Game/Screens/OnlinePlay/FooterButtonFreeMods.cs @@ -23,7 +23,18 @@ namespace osu.Game.Screens.OnlinePlay { public partial class FooterButtonFreeMods : FooterButton, IHasCurrentValue> { - public Bindable> Current { get; set; } = new BindableWithCurrent>(); + private readonly BindableWithCurrent> current = new BindableWithCurrent>(Array.Empty()); + + public Bindable> Current + { + get => current.Current; + set + { + ArgumentNullException.ThrowIfNull(value); + + current.Current = value; + } + } private OsuSpriteText count = null!;