1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix oversight on null

This commit is contained in:
Endrik Tombak 2020-04-09 19:30:40 +03:00
parent 35f97dfc75
commit deaf24f141

View File

@ -37,7 +37,8 @@ namespace osu.Game.Screens.Select.Carousel
if (LastSelected == null)
{
var recommendedBeatmapInfo = getRecommendedBeatmap(Children.OfType<CarouselBeatmap>().Where(b => !b.Filtered.Value).Select(b => b.Beatmap));
return Children.OfType<CarouselBeatmap>().First(b => b.Beatmap == recommendedBeatmapInfo);
if (recommendedBeatmapInfo != null)
return Children.OfType<CarouselBeatmap>().First(b => b.Beatmap == recommendedBeatmapInfo);
}
return base.GetNextToSelect();