1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 14:12:55 +08:00

Merge pull request #862 from peppy/fix-nullrefs

Fix some possible nullrefs on beatmap load failure
This commit is contained in:
Dean Herbert 2017-05-28 23:18:06 +09:00 committed by GitHub
commit b12bc9dac8

View File

@ -293,7 +293,7 @@ namespace osu.Game.Screens.Play
protected override bool OnExiting(Screen next)
{
if (HasFailed || !ValidForResume || pauseContainer.AllowExit || HitRenderer.HasReplayLoaded)
if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || HitRenderer?.HasReplayLoaded != false)
{
fadeOut();
return base.OnExiting(next);
@ -310,7 +310,7 @@ namespace osu.Game.Screens.Play
HitRenderer?.FadeOut(fade_out_duration);
Content.FadeOut(fade_out_duration);
hudOverlay.ScaleTo(0.7f, fade_out_duration * 3, EasingTypes.In);
hudOverlay?.ScaleTo(0.7f, fade_out_duration * 3, EasingTypes.In);
Background?.FadeTo(1f, fade_out_duration);
}