mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:53:22 +08:00
Fix crash when start button is repeatedly pressed
This commit is contained in:
parent
99a7ccc01a
commit
6fe1f57236
@ -83,7 +83,7 @@ namespace osu.Game.Screens.Multi
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
|
||||
screenStack = new ScreenStack(loungeSubScreen = new LoungeSubScreen(this.Push)) { RelativeSizeAxes = Axes.Both };
|
||||
screenStack = new ScreenStack(loungeSubScreen = new LoungeSubScreen(pushGameplayScreen)) { RelativeSizeAxes = Axes.Both };
|
||||
Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING };
|
||||
|
||||
waves.AddRange(new Drawable[]
|
||||
@ -169,6 +169,14 @@ namespace osu.Game.Screens.Multi
|
||||
Logger.Log($"Polling adjusted to {roomManager.TimeBetweenPolls}");
|
||||
}
|
||||
|
||||
private void pushGameplayScreen(IScreen gameplayScreen)
|
||||
{
|
||||
if (!this.IsCurrentScreen())
|
||||
return;
|
||||
|
||||
this.Push(gameplayScreen);
|
||||
}
|
||||
|
||||
public void APIStateChanged(APIAccess api, APIState state)
|
||||
{
|
||||
if (state != APIState.Online)
|
||||
|
Loading…
Reference in New Issue
Block a user