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

Fix possible exception

This commit is contained in:
smoogipoo 2021-07-19 20:50:30 +09:00
parent 2eec524f27
commit 3168a927dc

View File

@ -326,7 +326,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{
// the room may not be left immediately after a disconnection due to async flow,
// so checking the IsConnected status is also required.
if (client.Room == null || !client.IsConnected.Value)
if (client?.Room == null || !client.IsConnected.Value)
{
// room has not been created yet; exit immediately.
return base.OnExiting(next);