From a7853fc9cc96fa50b92b12b5c25dee18f9ccc11a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 24 Nov 2021 14:26:23 +0900 Subject: [PATCH] Fix cases of known-non-null --- osu.Game/Beatmaps/WorkingBeatmapCache.cs | 2 -- osu.Game/Overlays/Music/PlaylistOverlay.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game/Beatmaps/WorkingBeatmapCache.cs b/osu.Game/Beatmaps/WorkingBeatmapCache.cs index 0af28902a0..857a1ca06f 100644 --- a/osu.Game/Beatmaps/WorkingBeatmapCache.cs +++ b/osu.Game/Beatmaps/WorkingBeatmapCache.cs @@ -55,8 +55,6 @@ namespace osu.Game.Beatmaps public void Invalidate(BeatmapSetInfo info) { - if (info.Beatmaps == null) return; - foreach (var b in info.Beatmaps) Invalidate(b); } diff --git a/osu.Game/Overlays/Music/PlaylistOverlay.cs b/osu.Game/Overlays/Music/PlaylistOverlay.cs index b8d04eab4e..41c4942c55 100644 --- a/osu.Game/Overlays/Music/PlaylistOverlay.cs +++ b/osu.Game/Overlays/Music/PlaylistOverlay.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Music filter.Search.OnCommit += (sender, newText) => { - BeatmapInfo toSelect = list.FirstVisibleSet?.Beatmaps?.FirstOrDefault(); + BeatmapInfo toSelect = list.FirstVisibleSet?.Beatmaps.FirstOrDefault(); if (toSelect != null) {