From 359e5b71a5cffbb806592d8ccd5cf80a20038676 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 16 May 2019 17:13:03 +0900 Subject: [PATCH] Fix race condition causing player to never restart --- osu.Game/Screens/Play/Player.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 60054f38fa..30214d1b9c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -249,6 +249,10 @@ namespace osu.Game.Screens.Play if (!this.IsCurrentScreen()) return; sampleRestart?.Play(); + + // if a restart has been requested, cancel any pending completion (user has shown intent to restart). + onCompletionEvent = null; + ValidForResume = false; RestartRequested?.Invoke(); this.Exit();