1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 21:00:33 +08:00

Fix some possible nullrefs on beatmap load failure

This commit is contained in:
Dean Herbert 2017-05-26 17:33:50 +09:00
parent e67a00f1f6
commit 5eab611255

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