From d8ca11bf0dc268b71fc3453b4da94a6b7ba4d996 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 29 Oct 2016 04:29:43 +0900 Subject: [PATCH] Use Any instead of First to avoid potential throw. --- osu.Game/GameModes/Play/PlaySongSelect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/GameModes/Play/PlaySongSelect.cs b/osu.Game/GameModes/Play/PlaySongSelect.cs index 179436a0df..309cd3119b 100644 --- a/osu.Game/GameModes/Play/PlaySongSelect.cs +++ b/osu.Game/GameModes/Play/PlaySongSelect.cs @@ -181,7 +181,7 @@ namespace osu.Game.GameModes.Play return; //this is VERY temporary logic. - beatmapSetFlow.Children.Cast().First(b => + beatmapSetFlow.Children.Cast().Any(b => { var panel = b.BeatmapPanels.FirstOrDefault(p => p.Beatmap.Equals(beatmap)); if (panel != null)