From da0940ae0b0a7c4743da685a9388af15dbe4dbad Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 16 Dec 2017 23:55:55 +0900 Subject: [PATCH] Only apply criteria if there are items populated in the carousel --- osu.Game/Screens/Select/BeatmapCarousel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 2dba274831..98902b3f6b 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -284,7 +284,9 @@ namespace osu.Game.Screens.Select private void applyActiveCriteria(bool debounce, bool scroll) { - Action perform = delegate + if (root.Children?.Any() != true) return; + + void perform() { FilterTask = null; @@ -292,7 +294,7 @@ namespace osu.Game.Screens.Select updateItems(); if (scroll) ScrollToSelected(false); - }; + } FilterTask?.Cancel(); FilterTask = null;