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:
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);
|
||||
|
||||
Reference in New Issue
Block a user