mirror of https://github.com/ppy/osu
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:
commit
0895a01172
|
@ -28,7 +28,7 @@ public class MainMenu : OsuScreen
|
|||
{
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue