1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 09:32:54 +08:00

Add same load-cancel safeties to ensure tracks are disposed in card PlayButton

This commit is contained in:
Dean Herbert 2022-08-05 14:26:01 +09:00
parent 6823282604
commit 94ec653420

View File

@ -118,7 +118,10 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
// another async load might have completed before this one. // another async load might have completed before this one.
// if so, do not make any changes. // if so, do not make any changes.
if (loadedPreview != previewTrack) if (loadedPreview != previewTrack)
{
loadedPreview.Dispose();
return; return;
}
AddInternal(loadedPreview); AddInternal(loadedPreview);
toggleLoading(false); toggleLoading(false);