From 740efa57477f75da8078fb0d86e73bc603e7bb64 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 29 Sep 2019 12:13:41 +0800 Subject: [PATCH] Handle potential null case --- osu.Game/Overlays/MusicController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 172ae4e5cb..49d16a4f3e 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -75,7 +75,7 @@ namespace osu.Game.Overlays /// /// Returns whether the current beatmap track is playing. /// - public bool IsPlaying => beatmap.Value.Track.IsRunning; + public bool IsPlaying => beatmap.Value?.Track.IsRunning ?? false; private void handleBeatmapAdded(BeatmapSetInfo set) => Schedule(() => beatmapSets.Add(set));