mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Fix test not handling 0 beatmap sets
This commit is contained in:
parent
dca5efc59a
commit
26c0010fe6
@ -68,6 +68,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
createDisplay(() =>
|
||||
{
|
||||
var allBeatmapSets = manager.GetAllUsableBeatmapSets(IncludedDetails.Minimal);
|
||||
if (allBeatmapSets.Count == 0)
|
||||
return manager.DefaultBeatmap;
|
||||
|
||||
var randomBeatmapSet = allBeatmapSets[RNG.Next(0, allBeatmapSets.Count - 1)];
|
||||
var randomBeatmap = randomBeatmapSet.Beatmaps[RNG.Next(0, randomBeatmapSet.Beatmaps.Count - 1)];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user