Fix Player potentially running MakeCurrent when already removed from the screen stack

Closes #12919.
This commit is contained in:
Dean Herbert 2021-05-24 13:53:51 +09:00
parent babe24ff5d
commit a69a1b5211

View File

@ -519,7 +519,7 @@ namespace osu.Game.Screens.Play
// there is a chance that the exit was performed after the transition to results has started.
// we want to give the user what they want, so forcefully return to this screen (to proceed with the upwards exit process).
if (!this.IsCurrentScreen())
if (!this.IsCurrentScreen() && this.GetChildScreen() != null)
{
ValidForResume = false;
this.MakeCurrent();