Fix screen exit potentially occuring during transition

This commit is contained in:
Dean Herbert
2020-10-28 18:47:15 +09:00
parent 4df8119852
commit 9807089834
2 changed files with 12 additions and 2 deletions

View File

@ -45,7 +45,12 @@ namespace osu.Game.Screens.Play
private void userBeganPlaying(int userId, SpectatorState state)
{
if (userId == score.ScoreInfo.UserID)
Schedule(this.Exit);
{
Schedule(() =>
{
if (this.IsCurrentScreen()) this.Exit();
});
}
}
protected override void Dispose(bool isDisposing)