From cf9a5baafae910e287196d8fe702b44e2c1f2b86 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Wed, 7 Aug 2019 14:51:24 +0900 Subject: [PATCH] Explicity dispose osuGame instances --- osu.Game.Tests/Visual/Menus/TestSceneScreenNavigation.cs | 3 +++ osu.Game/Overlays/MusicController.cs | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Menus/TestSceneScreenNavigation.cs b/osu.Game.Tests/Visual/Menus/TestSceneScreenNavigation.cs index 08afe90de8..663447d0b4 100644 --- a/osu.Game.Tests/Visual/Menus/TestSceneScreenNavigation.cs +++ b/osu.Game.Tests/Visual/Menus/TestSceneScreenNavigation.cs @@ -51,7 +51,10 @@ namespace osu.Game.Tests.Visual.Menus AddStep("Create new game instance", () => { if (osuGame != null) + { Remove(osuGame); + osuGame.Dispose(); + } osuGame = new TestOsuGame(); osuGame.SetHost(gameHost); diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 91ae92320a..abbcec5094 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -316,10 +316,6 @@ namespace osu.Game.Overlays private void next(bool instant = false) { - // beatmapSets doesn't get populated until loading has completed. - if (!IsLoaded) - return; - if (!instant) queuedDirection = TransformDirection.Next;