mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42:55 +08:00
Merge pull request #16823 from smoogipoo/fix-multi-spectate-crash
Fix crash on disconnection during multi-spectate
This commit is contained in:
commit
076388f5b0
@ -2,7 +2,6 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -228,7 +227,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
|
|
||||||
public override bool OnBackButton()
|
public override bool OnBackButton()
|
||||||
{
|
{
|
||||||
Debug.Assert(multiplayerClient.Room != null);
|
if (multiplayerClient.Room == null)
|
||||||
|
return base.OnBackButton();
|
||||||
|
|
||||||
// On a manual exit, set the player back to idle unless gameplay has finished.
|
// On a manual exit, set the player back to idle unless gameplay has finished.
|
||||||
if (multiplayerClient.Room.State != MultiplayerRoomState.Open)
|
if (multiplayerClient.Room.State != MultiplayerRoomState.Open)
|
||||||
|
Loading…
Reference in New Issue
Block a user