mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Fix intermittent leaderboard crash due to request finishing after drawable is disposed
This commit is contained in:
parent
2a5556de33
commit
0fa5e1b28e
@ -153,10 +153,11 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
var req = new GetScoresRequest(fetchBeatmapInfo, fetchRuleset, Scope, requestMods);
|
||||
|
||||
req.Success += r => SetScores(
|
||||
// Schedule is required to avoid potential object disposed exception when LoadComponentAsync is eventually called.
|
||||
req.Success += r => Schedule(() => SetScores(
|
||||
scoreManager.OrderByTotalScore(r.Scores.Select(s => s.ToScoreInfo(rulesets, fetchBeatmapInfo))),
|
||||
r.UserScore?.CreateScoreInfo(rulesets, fetchBeatmapInfo)
|
||||
);
|
||||
));
|
||||
|
||||
return req;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user