1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:12:56 +08:00

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.
This commit is contained in:
Dean Herbert 2024-07-16 03:02:04 +09:00
parent c854dfd6fb
commit 1083e71ce6
No known key found for this signature in database

View File

@ -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);