mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 07:27:45 +08:00
Merge pull request #7872 from EVAST9919/spotlights-fix
Fix possible error in SpotlightsLayout after it's disposal
This commit is contained in:
commit
0c1822bafe
@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Rankings
|
||||
private void getSpotlights()
|
||||
{
|
||||
spotlightsRequest = new GetSpotlightsRequest();
|
||||
spotlightsRequest.Success += response => selector.Spotlights = response.Spotlights;
|
||||
spotlightsRequest.Success += response => Schedule(() => selector.Spotlights = response.Spotlights);
|
||||
api.Queue(spotlightsRequest);
|
||||
}
|
||||
|
||||
@ -151,11 +151,11 @@ namespace osu.Game.Overlays.Rankings
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
spotlightsRequest?.Cancel();
|
||||
getRankingsRequest?.Cancel();
|
||||
cancellationToken?.Cancel();
|
||||
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user