diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs
index ff3dee55af..79616ef97c 100644
--- a/osu.Game/OsuGame.cs
+++ b/osu.Game/OsuGame.cs
@@ -446,7 +446,7 @@ namespace osu.Game
///
/// The action to perform once we are in the correct state.
/// An optional collection of valid screen types. If any of these screens are already current we can perform the action immediately, else the first valid parent will be made current before performing the action. is used if not specified.
- protected void PerformFromScreen(Action action, IEnumerable validScreens = null)
+ public void PerformFromScreen(Action action, IEnumerable validScreens = null)
{
performFromMainMenuTask?.Cancel();
diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs
index cb5ceefb0f..c70fbb67a4 100644
--- a/osu.Game/Screens/Menu/MainMenu.cs
+++ b/osu.Game/Screens/Menu/MainMenu.cs
@@ -141,12 +141,15 @@ namespace osu.Game.Screens.Menu
preloadSongSelect();
}
+ [Resolved]
+ private OsuGame game { get; set; }
+
private void confirmAndExit()
{
if (exitConfirmed) return;
exitConfirmed = true;
- this.Exit();
+ game.PerformFromScreen(menu => menu.Exit());
}
private void preloadSongSelect()