Fix potential crash when exiting editor test mode

This commit is contained in:
Dean Herbert 2022-07-14 00:58:32 +09:00
parent 7ed05277f8
commit 7ac04d0478
1 changed files with 7 additions and 1 deletions

View File

@ -35,7 +35,13 @@ protected override void LoadComplete()
ScoreProcessor.HasCompleted.BindValueChanged(completed =>
{
if (completed.NewValue)
Scheduler.AddDelayed(this.Exit, RESULTS_DISPLAY_DELAY);
{
Scheduler.AddDelayed(() =>
{
if (this.IsCurrentScreen())
this.Exit();
}, RESULTS_DISPLAY_DELAY);
}
});
}