diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyBeatmapSkin.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyBeatmapSkin.cs index 4676f14655..c3742601c1 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyBeatmapSkin.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyBeatmapSkin.cs @@ -63,9 +63,12 @@ namespace osu.Game.Rulesets.Osu.Tests private ExposedPlayer loadBeatmap(bool userHasCustomColours, bool beatmapHasColours) { ExposedPlayer player; + OsuScreenStack stack; Beatmap.Value = new CustomSkinWorkingBeatmap(audio, beatmapHasColours); - Child = new OsuScreenStack(player = new ExposedPlayer(userHasCustomColours)) { RelativeSizeAxes = Axes.Both }; + Child = stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both }; + + stack.Push(player = new ExposedPlayer(userHasCustomColours)); return player; } diff --git a/osu.Game/Screens/OsuScreenStack.cs b/osu.Game/Screens/OsuScreenStack.cs index db577ea5e9..a05933ef0e 100644 --- a/osu.Game/Screens/OsuScreenStack.cs +++ b/osu.Game/Screens/OsuScreenStack.cs @@ -13,7 +13,7 @@ namespace osu.Game.Screens [Cached] private BackgroundScreenStack backgroundScreenStack; - private ParallaxContainer parallaxContainer; + private readonly ParallaxContainer parallaxContainer; protected float ParallaxAmount => parallaxContainer.ParallaxAmount;