1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Merge pull request #6676 from peppy/fix-multi-logout-crash

Fix multi logout crash
This commit is contained in:
Dan Balasescu 2019-11-01 17:13:16 +09:00 committed by GitHub
commit 036e67bbc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,14 +167,17 @@ namespace osu.Game.Screens.Multi
public void APIStateChanged(IAPIProvider api, APIState state)
{
if (state != APIState.Online)
forcefullyExit();
Schedule(forcefullyExit);
}
private void forcefullyExit()
{
// This is temporary since we don't currently have a way to force screens to be exited
if (this.IsCurrentScreen())
this.Exit();
{
while (this.IsCurrentScreen())
this.Exit();
}
else
{
this.MakeCurrent();