From d74aa52e69b20c7cfc8269b5b613651341359699 Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Tue, 8 Jan 2019 18:35:23 +1030 Subject: [PATCH] Revert to old behaviour if no TrackManager available --- osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs b/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs index 74e9825dc3..10dffb6125 100644 --- a/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs @@ -28,7 +28,7 @@ namespace osu.Game.Beatmaps { this.store = store; this.audioManager = audioManager; - this.trackManager = audioManager.Track; + trackManager = audioManager?.Track; } protected override IBeatmap GetBeatmap() @@ -70,7 +70,7 @@ namespace osu.Game.Beatmaps try { var trackData = store.GetStream(getPathForFile(Metadata.AudioFile)); - return trackData == null ? null : trackManager.CreateTrack(trackData); + return trackData == null ? null : trackManager?.CreateTrack(trackData) ?? new TrackBass(trackData); } catch { @@ -91,7 +91,7 @@ namespace osu.Game.Beatmaps try { var trackData = store.GetStream(getPathForFile(Metadata.AudioFile)); - return trackData == null ? null : trackManager.CreateWaveform(trackData); + return trackData == null ? null : trackManager?.CreateWaveform(trackData) ?? new Waveform(trackData); } catch {