1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 23:22:55 +08:00

Fix hard crash when pressing random if no beatmaps avaliable

This commit is contained in:
EVAST9919 2017-07-29 17:42:32 +03:00
parent e121b119be
commit 6b3a81f567

View File

@ -181,12 +181,12 @@ namespace osu.Game.Screens.Select
if (groups.Count == 0)
return;
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
var visibleGroups = getVisibleGroups();
if (!visibleGroups.Any())
return;
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
BeatmapGroup group;
if (randomType == SelectionRandomType.RandomPermutation)