Ensure FailAnimation is disposed synchronously to avoid test failures

This commit is contained in:
Dean Herbert 2021-10-11 14:05:31 +09:00
parent a16ffd2976
commit 3d6602b8df

View File

@ -947,7 +947,7 @@ namespace osu.Game.Screens.Play
public override void OnSuspending(IScreen next)
{
screenSuspension?.Expire();
screenSuspension?.RemoveAndDisposeImmediately();
fadeOut();
base.OnSuspending(next);
@ -955,7 +955,8 @@ namespace osu.Game.Screens.Play
public override bool OnExiting(IScreen next)
{
screenSuspension?.Expire();
screenSuspension?.RemoveAndDisposeImmediately();
failAnimation?.RemoveAndDisposeImmediately();
// if arriving here and the results screen preparation task hasn't run, it's safe to say the user has not completed the beatmap.
if (prepareScoreForDisplayTask == null)