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.
// if so, do not make any changes.
if (loadedPreview != previewTrack)
{
loadedPreview.Dispose();
return;
}
AddInternal(loadedPreview);
toggleLoading(false);