mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
fix for Drawables being empty crashing
This commit is contained in:
parent
08e15d63c4
commit
33480b85c8
@ -194,7 +194,11 @@ namespace osu.Game.Screens.Select
|
||||
if (!Items.Any())
|
||||
return;
|
||||
|
||||
int originalIndex = Items.IndexOf(selectedBeatmap?.Drawables.First());
|
||||
var d = selectedBeatmap?.Drawables.FirstOrDefault();
|
||||
if (d == null)
|
||||
return;
|
||||
|
||||
int originalIndex = Items.IndexOf(d);
|
||||
int currentIndex = originalIndex;
|
||||
|
||||
// local function to increment the index in the required direction, wrapping over extremities.
|
||||
|
Loading…
Reference in New Issue
Block a user