mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 19:33:20 +08:00
Fix screen exit potentially occuring during transition
This commit is contained in:
parent
4df8119852
commit
9807089834
@ -45,7 +45,12 @@ namespace osu.Game.Screens.Play
|
|||||||
private void userBeganPlaying(int userId, SpectatorState state)
|
private void userBeganPlaying(int userId, SpectatorState state)
|
||||||
{
|
{
|
||||||
if (userId == score.ScoreInfo.UserID)
|
if (userId == score.ScoreInfo.UserID)
|
||||||
Schedule(this.Exit);
|
{
|
||||||
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
if (this.IsCurrentScreen()) this.Exit();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
@ -28,7 +28,12 @@ namespace osu.Game.Screens.Play
|
|||||||
private void userBeganPlaying(int userId, SpectatorState state)
|
private void userBeganPlaying(int userId, SpectatorState state)
|
||||||
{
|
{
|
||||||
if (userId == Score.UserID)
|
if (userId == Score.UserID)
|
||||||
Schedule(this.Exit);
|
{
|
||||||
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
if (this.IsCurrentScreen()) this.Exit();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
Loading…
Reference in New Issue
Block a user