diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 7dd6be8dc6..7da6f1ce2f 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -106,6 +106,8 @@ namespace osu.Game.Overlays.Direct beatmaps.BeatmapDownloadBegan += attachDownload; } + public override bool DisposeOnDeathRemoval => true; + protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); diff --git a/osu.Game/Overlays/Direct/PlayButton.cs b/osu.Game/Overlays/Direct/PlayButton.cs index c00fb9b122..1d67bc2d90 100644 --- a/osu.Game/Overlays/Direct/PlayButton.cs +++ b/osu.Game/Overlays/Direct/PlayButton.cs @@ -145,6 +145,12 @@ namespace osu.Game.Overlays.Direct } } + protected override void Dispose(bool isDisposing) + { + base.Dispose(isDisposing); + Playing.Value = false; + } + private TrackLoader trackLoader; private AudioManager audio;