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

Make resolved multiplayerClient field nullable

This commit is contained in:
Marvin Schürz 2023-10-04 08:35:45 +02:00
parent 0726ccb988
commit 6bd51b32b4

View File

@ -64,7 +64,7 @@ namespace osu.Game.Users
protected OsuColour Colours { get; private set; } = null!; protected OsuColour Colours { get; private set; } = null!;
[Resolved] [Resolved]
private MultiplayerClient multiplayerClient { get; set; } = null!; private MultiplayerClient? multiplayerClient { get; set; }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
@ -124,7 +124,7 @@ namespace osu.Game.Users
if ( if (
User.IsOnline && User.IsOnline &&
multiplayerClient.Room != null && multiplayerClient?.Room != null &&
multiplayerClient.Room.Users.All(u => u.UserID != User.Id) multiplayerClient.Room.Users.All(u => u.UserID != User.Id)
) )
{ {