From 1e73b09e578cb949bfee28829aef68042216f201 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Nov 2021 14:11:21 +0900 Subject: [PATCH] Fix another couple of cases of incorrect string null/empty checking --- osu.Game/Beatmaps/WorkingBeatmapCache.cs | 2 +- osu.Game/Rulesets/Edit/Checks/CheckAudioQuality.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/WorkingBeatmapCache.cs b/osu.Game/Beatmaps/WorkingBeatmapCache.cs index 40ae627619..11257e3abc 100644 --- a/osu.Game/Beatmaps/WorkingBeatmapCache.cs +++ b/osu.Game/Beatmaps/WorkingBeatmapCache.cs @@ -149,7 +149,7 @@ namespace osu.Game.Beatmaps protected override Texture GetBackground() { - if (Metadata?.BackgroundFile == null) + if (string.IsNullOrEmpty(Metadata?.BackgroundFile)) return null; try diff --git a/osu.Game/Rulesets/Edit/Checks/CheckAudioQuality.cs b/osu.Game/Rulesets/Edit/Checks/CheckAudioQuality.cs index 08e0312b64..ec2ff68aad 100644 --- a/osu.Game/Rulesets/Edit/Checks/CheckAudioQuality.cs +++ b/osu.Game/Rulesets/Edit/Checks/CheckAudioQuality.cs @@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Edit.Checks public IEnumerable Run(BeatmapVerifierContext context) { string audioFile = context.Beatmap.Metadata?.AudioFile; - if (audioFile == null) + if (string.IsNullOrEmpty(audioFile)) yield break; var track = context.WorkingBeatmap.Track;