1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Safety check

This commit is contained in:
Dean Herbert 2018-11-08 13:08:59 +09:00
parent bd6d3f1473
commit a31507ff0e

View File

@ -157,6 +157,9 @@ namespace osu.Game.Tournament.Screens.MapPool
private void addForBeatmap(int beatmapId)
{
if (currentMatch.Value == null)
return;
if (currentMatch.Value.Grouping.Value.Beatmaps.All(b => b.BeatmapInfo.OnlineBeatmapID != beatmapId))
// don't attempt to add if the beatmap isn't in our pool
return;