Avoid handling null playlist items when updating avaialability display

This commit is contained in:
Dean Herbert 2021-02-05 17:19:23 +09:00
parent 791cbb7f03
commit 110458612d

View File

@ -36,7 +36,15 @@ namespace osu.Game.Online.Rooms
{
base.LoadComplete();
SelectedItem.BindValueChanged(item => Model.Value = item.NewValue?.Beatmap.Value.BeatmapSet, true);
SelectedItem.BindValueChanged(item =>
{
// the underlying playlist is regularly cleared for maintenance purposes (things which probably need to be fixed eventually).
// to avoid exposing a state change when there may actually be none, ignore all nulls for now.
if (item.NewValue == null)
return;
Model.Value = item.NewValue.Beatmap.Value.BeatmapSet;
}, true);
}
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)