Fix test failures

This commit is contained in:
Dean Herbert 2019-09-19 17:40:46 +09:00
parent 929f05884b
commit fa54a0bfd3
1 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ public class MainMenu : OsuScreen
[Resolved]
private IAPIProvider api { get; set; }
[Resolved]
[Resolved(canBeNull: true)]
private DialogOverlay dialogOverlay { get; set; }
private BackgroundScreenDefault background;
@ -237,9 +237,9 @@ public override void OnResuming(IScreen last)
public override bool OnExiting(IScreen next)
{
if (holdDelay.Value == 0 && !exitConfirmed)
if (holdDelay.Value == 0 && !exitConfirmed && dialogOverlay != null)
{
dialogOverlay?.Push(new ConfirmExitDialog(() =>
dialogOverlay.Push(new ConfirmExitDialog(() =>
{
exitConfirmed = true;
this.Exit();