1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 16:02:55 +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
commit 8dce147b8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}