1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00

Fix Player crashing due to null BeatmapInfo (now unused).

This commit is contained in:
smoogipooo 2017-07-20 01:27:27 +09:30
parent a7d4a3d473
commit d75e439f94

View File

@ -35,8 +35,6 @@ namespace osu.Game.Screens.Play
internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor; internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor;
public BeatmapInfo BeatmapInfo;
public Action RestartRequested; public Action RestartRequested;
internal override bool AllowBeatmapRulesetChange => false; internal override bool AllowBeatmapRulesetChange => false;
@ -85,7 +83,7 @@ namespace osu.Game.Screens.Play
{ {
if (!Beatmap.Value.WithStoryboard) if (!Beatmap.Value.WithStoryboard)
// we need to ensure the storyboard is loaded. // we need to ensure the storyboard is loaded.
Beatmap.Value = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true); Beatmap.Value = beatmaps.GetWorkingBeatmap(Beatmap.Value.BeatmapInfo, withStoryboard: true);
if (Beatmap.Value.Beatmap == null) if (Beatmap.Value.Beatmap == null)
throw new InvalidOperationException("Beatmap was not loaded"); throw new InvalidOperationException("Beatmap was not loaded");