1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Cleanup test scene disposal

This commit is contained in:
smoogipoo 2020-08-06 17:15:33 +09:00
parent e8ab3cff3c
commit c72ab9047e

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -169,7 +170,10 @@ namespace osu.Game.Tests.Visual
rulesetDependencies?.Dispose(); rulesetDependencies?.Dispose();
if (MusicController?.TrackLoaded == true) if (MusicController?.TrackLoaded == true)
MusicController.Stop(); {
Debug.Assert(MusicController.CurrentTrack != null);
MusicController.CurrentTrack.Stop();
}
if (contextFactory.IsValueCreated) if (contextFactory.IsValueCreated)
contextFactory.Value.ResetDatabase(); contextFactory.Value.ResetDatabase();