From 6b3a81f5671b064e9ab067819f94a6c4ac675673 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Sat, 29 Jul 2017 17:42:32 +0300 Subject: [PATCH] Fix hard crash when pressing random if no beatmaps avaliable --- osu.Game/Screens/Select/BeatmapCarousel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 1177d820c3..9e5446a573 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -181,12 +181,12 @@ namespace osu.Game.Screens.Select if (groups.Count == 0) return; - randomSelectedBeatmaps.Push(new KeyValuePair(selectedGroup, selectedGroup.SelectedPanel)); - var visibleGroups = getVisibleGroups(); if (!visibleGroups.Any()) return; + randomSelectedBeatmaps.Push(new KeyValuePair(selectedGroup, selectedGroup.SelectedPanel)); + BeatmapGroup group; if (randomType == SelectionRandomType.RandomPermutation)