1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 01:22:59 +08:00

Merge pull request #6312 from peppy/fix-potential-null-test

Handle potential null case
This commit is contained in:
Dan Balasescu 2019-09-30 12:29:42 +09:00 committed by GitHub
commit 4e9e24f099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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));