Fix startup crash if main menu does not load fast enough

This commit is contained in:
Dean Herbert 2019-06-19 13:16:19 +09:00
parent fbd9ebf02d
commit f26fe53feb

View File

@ -28,7 +28,7 @@ namespace osu.Game.Screens.Menu
{
private ButtonSystem buttons;
public override bool HideOverlaysOnEnter => buttons.State == ButtonSystemState.Initial;
public override bool HideOverlaysOnEnter => buttons == null || buttons.State == ButtonSystemState.Initial;
protected override bool AllowBackButton => buttons.State != ButtonSystemState.Initial && host.CanExit;