Add early return of carousel group has no items

This commit is contained in:
Dean Herbert 2022-10-25 13:34:21 +09:00
parent 2456a18bc1
commit 22ea9a8ab4

View File

@ -114,6 +114,9 @@ namespace osu.Game.Screens.Select.Carousel
/// <returns>An unfiltered item nearest to the last selected one or null if all items are filtered</returns>
protected virtual CarouselItem GetNextToSelect()
{
if (Items.Count == 0)
return null;
int forwardsIndex = lastSelectedIndex;
bool hasForwards;