mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 12:22:56 +08:00
Add same load-cancel safeties to ensure tracks are disposed in card PlayButton
This commit is contained in:
parent
6823282604
commit
94ec653420
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user