1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 01:39:54 +08:00

Handle potential null case

This commit is contained in:
Dean Herbert
2019-09-29 12:13:41 +08:00
Unverified
parent bbb38e0394
commit 740efa5747
+1 -1
View File
@@ -75,7 +75,7 @@ namespace osu.Game.Overlays
/// <summary>
/// Returns whether the current beatmap track is playing.
/// </summary>
public bool IsPlaying => beatmap.Value.Track.IsRunning;
public bool IsPlaying => beatmap.Value?.Track.IsRunning ?? false;
private void handleBeatmapAdded(BeatmapSetInfo set) =>
Schedule(() => beatmapSets.Add(set));