From 9be25c37589c3a3a33a3e7a6cbf96700d873af8e Mon Sep 17 00:00:00 2001 From: David Zhao Date: Mon, 18 Feb 2019 16:00:59 +0900 Subject: [PATCH] Fix unit tests --- osu.Game/Screens/Play/Player.cs | 3 ++- osu.Game/Screens/Play/PlayerLoader.cs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 5aed939c03..2281324ce3 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -249,7 +249,8 @@ namespace osu.Game.Screens.Play foreach (var mod in Beatmap.Value.Mods.Value.OfType()) mod.ApplyToScoreProcessor(ScoreProcessor); - Background.UpdateDim.Value = true; + if (Background != null) + Background.UpdateDim.Value = true; } private void applyRateFromMods() diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 4bb126e0e2..4844883dfe 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -242,7 +242,9 @@ namespace osu.Game.Screens.Play content.ScaleTo(0.7f, 150, Easing.InQuint); this.FadeOut(150); cancelLoad(); - Background.UpdateDim.Value = false; + + if (Background != null) + Background.UpdateDim.Value = false; return base.OnExiting(next); }