mirror of
https://github.com/ppy/osu.git
synced 2026-06-01 11:50:35 +08:00
Fix multiplayer calling OnExiting() twice
Once via explicit call to `OnExiting()`, and the second time via `.Exit()`.
This commit is contained in:
@@ -152,10 +152,12 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
while (screenStack.CurrentScreen != null && screenStack.CurrentScreen is not LoungeSubScreen)
|
||||
{
|
||||
var subScreen = (Screen)screenStack.CurrentScreen;
|
||||
if (subScreen.IsLoaded && subScreen.OnExiting(e))
|
||||
return true;
|
||||
|
||||
subScreen.Exit();
|
||||
|
||||
// If it's still current after calling Exit(), it must have blocked OnExiting().
|
||||
if (subScreen.IsCurrentScreen())
|
||||
return true;
|
||||
}
|
||||
|
||||
waves.Hide();
|
||||
|
||||
Reference in New Issue
Block a user