Merge pull request #4424 from nekodex/fix-mp-songselect-regression

Fix crash on cancelling multiplayer song select when no existing song is selected
This commit is contained in:
Dean Herbert 2019-03-07 15:40:20 +09:00 committed by GitHub
commit 0b4f10950f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -60,9 +60,12 @@ public override bool OnExiting(IScreen next)
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;