mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Avoid handling null playlist items when updating avaialability display
This commit is contained in:
parent
791cbb7f03
commit
110458612d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user