From c4402e9ce511d81889e115159ff7f6c388471b42 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 7 Mar 2026 04:40:25 +0900 Subject: [PATCH] Fix potential crash due to handling scores in leaderboard post-disposal (#36860) Closes https://github.com/ppy/osu/issues/36858. Classic. --- osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs b/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs index 660b511011..4373b7b073 100644 --- a/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs +++ b/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs @@ -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);