mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 02:43:01 +08:00
Fix gameplay tests crashing when run multiple times
This commit is contained in:
parent
fbd645f06e
commit
6c671434ec
@ -203,5 +203,15 @@ namespace osu.Game.Screens.Play
|
||||
api.Queue(request);
|
||||
return scoreSubmissionSource.Task;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
// Specific to tests, the player can be disposed without OnExiting() ever being called.
|
||||
// We should make sure that the gameplay session has finished even in this case.
|
||||
if (LoadedBeatmapSuccessfully)
|
||||
spectatorClient.EndPlaying(GameplayState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user