1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 01:00:27 +08:00

Merge pull request #12922 from peppy/fix-bad-make-current-call

Fix `Player` potentially running `MakeCurrent` when already removed from the screen stack
This commit is contained in:
Dan Balasescu
2021-05-28 00:42:42 +09:00
committed by GitHub
Unverified
+4 -1
View File
@@ -522,7 +522,10 @@ namespace osu.Game.Screens.Play
if (!this.IsCurrentScreen())
{
ValidForResume = false;
this.MakeCurrent();
// in the potential case that this instance has already been exited, this is required to avoid a crash.
if (this.GetChildScreen() != null)
this.MakeCurrent();
return;
}