Merge pull request #5064 from peppy/fix-main-menu-nullref

Fix startup crash if main menu does not load fast enough
This commit is contained in:
Dan Balasescu 2019-06-19 14:17:00 +09:00 committed by GitHub
commit 0895a01172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;