1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-13 20:33:35 +08:00

Fix potential crash due to handling scores in leaderboard post-disposal (#36860)

Closes https://github.com/ppy/osu/issues/36858. Classic.
This commit is contained in:
Dean Herbert
2026-03-07 04:40:25 +09:00
committed by GitHub
Unverified
parent de9cf751d2
commit c4402e9ce5
@@ -256,7 +256,9 @@ namespace osu.Game.Screens.Select
{
// only bind this after the first fetch to avoid reading stale scores.
fetchedScores.BindTo(leaderboardManager.Scores);
fetchedScores.BindValueChanged(_ => updateScores(), true);
// Schedule is important here to avoid handling changes after this drawable is disposed.
fetchedScores.BindValueChanged(_ => Schedule(updateScores), true);
initialFetchComplete = true;
}
}, initialFetchComplete && fetchScope != BeatmapLeaderboardScope.Local ? 300 : 0);