mirror of
https://github.com/ppy/osu
synced 2025-03-02 09:30:57 +00:00
Fix crash when starting with an empty bracket
This commit is contained in:
parent
8d0d1ca378
commit
831686d20b
@ -104,9 +104,10 @@ namespace osu.Game.Tournament.Screens.MapPool
|
||||
|
||||
private void beatmapChanged(ValueChangedEvent<BeatmapInfo> beatmap)
|
||||
{
|
||||
if (currentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) < 2)
|
||||
if (currentMatch.Value == null || currentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) < 2)
|
||||
return;
|
||||
|
||||
// if bans have already been placed, beatmap changes result in a selection being made autoamtically
|
||||
if (beatmap.NewValue.OnlineBeatmapID != null)
|
||||
addForBeatmap(beatmap.NewValue.OnlineBeatmapID.Value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user