mirror of
https://github.com/ppy/osu
synced 2025-01-15 18:41:14 +00:00
Fix potential double-disposal of player if PlayerLoader is finalised
This commit is contained in:
parent
54e53f7190
commit
5872b61988
@ -209,8 +209,11 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
// if the player never got pushed, we should explicitly dispose it.
|
||||
loadTask?.ContinueWith(_ => player.Dispose());
|
||||
if (isDisposing)
|
||||
{
|
||||
// if the player never got pushed, we should explicitly dispose it.
|
||||
loadTask?.ContinueWith(_ => player.Dispose());
|
||||
}
|
||||
}
|
||||
|
||||
private class BeatmapMetadataDisplay : Container
|
||||
|
Loading…
Reference in New Issue
Block a user