mirror of
https://github.com/ppy/osu
synced 2025-01-08 23:29:43 +00:00
Initialise container earlier to avoid null reference failures
This commit is contained in:
parent
1e03bd11a3
commit
064aaeb60e
@ -65,8 +65,6 @@ namespace osu.Game.Rulesets.UI
|
||||
/// </summary>
|
||||
public override Playfield Playfield => playfield.Value;
|
||||
|
||||
private PlayfieldAdjustmentContainer playfieldAdjustmentContainer;
|
||||
|
||||
public override PlayfieldAdjustmentContainer PlayfieldAdjustmentContainer => playfieldAdjustmentContainer;
|
||||
|
||||
public override Container Overlays { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||
@ -79,6 +77,8 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
||||
|
||||
private readonly PlayfieldAdjustmentContainer playfieldAdjustmentContainer;
|
||||
|
||||
private bool allowBackwardsSeeks;
|
||||
|
||||
public override bool AllowBackwardsSeeks
|
||||
@ -144,6 +144,7 @@ namespace osu.Game.Rulesets.UI
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
KeyBindingInputManager = CreateInputManager();
|
||||
playfieldAdjustmentContainer = CreatePlayfieldAdjustmentContainer();
|
||||
playfield = new Lazy<Playfield>(() => CreatePlayfield().With(p =>
|
||||
{
|
||||
p.NewResult += (_, r) => NewResult?.Invoke(r);
|
||||
@ -195,8 +196,7 @@ namespace osu.Game.Rulesets.UI
|
||||
audioContainer.WithChild(KeyBindingInputManager
|
||||
.WithChildren(new Drawable[]
|
||||
{
|
||||
playfieldAdjustmentContainer = CreatePlayfieldAdjustmentContainer()
|
||||
.WithChild(Playfield),
|
||||
playfieldAdjustmentContainer.WithChild(Playfield),
|
||||
Overlays
|
||||
})),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user