Fix some nullref crashes when escaping out of new room creation

This commit is contained in:
Jamie Taylor
2019-03-06 17:13:28 +09:00
parent 5de6e29294
commit 6e5ea78ca2
2 changed files with 5 additions and 2 deletions

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Humanizer;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@ -61,7 +62,7 @@ namespace osu.Game.Screens.Select
return true;
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value?.Beatmap);
Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value?.RequiredMods;
Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value?.RequiredMods ?? Enumerable.Empty<Mod>();
Ruleset.Value = CurrentItem.Value?.Ruleset;
Beatmap.Disabled = true;