From 958598d13ba38841a86ac46029d4e363aae88a9c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 15 May 2019 19:39:36 +0900 Subject: [PATCH] Fix crash on switching from main menu to gameplay too fast --- osu.Game/Screens/Menu/MainMenu.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 788cad3bad..3afe9b9371 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -155,9 +155,11 @@ namespace osu.Game.Screens.Menu protected override void LogoSuspending(OsuLogo logo) { - logo.FadeOut(300, Easing.InSine) - .ScaleTo(0.2f, 300, Easing.InSine) - .OnComplete(l => buttons.SetOsuLogo(null)); + var seq = logo.FadeOut(300, Easing.InSine) + .ScaleTo(0.2f, 300, Easing.InSine); + + seq.OnComplete(_ => buttons.SetOsuLogo(null)); + seq.OnAbort(_ => buttons.SetOsuLogo(null)); } private void beatmap_ValueChanged(ValueChangedEvent e)