1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 19:11:18 +08:00

Ensure FailAnimation is disposed synchronously to avoid test failures

This commit is contained in:
Dean Herbert
2021-10-11 14:05:31 +09:00
Unverified
parent a16ffd2976
commit 3d6602b8df
+3 -2
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)