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