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:
parent
c854dfd6fb
commit
1083e71ce6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user