1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Only attempt to restore CurrentItem state if present

This commit is contained in:
Jamie Taylor 2019-03-07 14:09:28 +09:00
parent 00cdb3a44a
commit e13516c2ba
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -60,9 +60,12 @@ namespace osu.Game.Screens.Select
if (base.OnExiting(next)) if (base.OnExiting(next))
return true; return true;
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value?.Beatmap); if (CurrentItem.Value != null)
Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value?.RequiredMods; {
Ruleset.Value = CurrentItem.Value?.Ruleset; Ruleset.Value = CurrentItem.Value.Ruleset;
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value.Beatmap);
Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value.RequiredMods;
}
Beatmap.Disabled = true; Beatmap.Disabled = true;
Ruleset.Disabled = true; Ruleset.Disabled = true;