From 1083e71ce6aadd9b9921b7dfbc8f1502390ccfd2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 16 Jul 2024 03:02:04 +0900 Subject: [PATCH] Fix potential crash when exiting daily challenge screen Without the schedule this will potentially run after disposal of the local drawable hierarchy. Closes https://github.com/ppy/osu/issues/28875. --- .../OnlinePlay/DailyChallenge/DailyChallengeLeaderboard.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallengeLeaderboard.cs b/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallengeLeaderboard.cs index 4d4ae755fc..2b2c3a5e1f 100644 --- a/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallengeLeaderboard.cs +++ b/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallengeLeaderboard.cs @@ -122,7 +122,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge { var request = new IndexPlaylistScoresRequest(room.RoomID.Value!.Value, playlistItem.ID); - request.Success += req => + request.Success += req => Schedule(() => { var best = req.Scores.Select(s => s.CreateScoreInfo(scoreManager, rulesets, playlistItem, beatmap.Value.BeatmapInfo)).ToArray(); var userBest = req.UserScore?.CreateScoreInfo(scoreManager, rulesets, playlistItem, beatmap.Value.BeatmapInfo); @@ -165,7 +165,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge } userBestHeader.FadeTo(userBest == null ? 0 : 1); - }; + }); loadingLayer.Show(); scoreFlow.FadeTo(0.5f, 400, Easing.OutQuint);