Allow channel manager and osugame to be null

This commit is contained in:
smoogipoo
2018-12-22 14:38:46 +09:00
parent dbd391825a
commit 09d7dc73dc
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.Screens.Multi.Match.Components
{
private readonly Room room;
[Resolved]
[Resolved(CanBeNull = true)]
private ChannelManager channelManager { get; set; }
public MatchChatDisplay(Room room)
@ -30,7 +30,7 @@ namespace osu.Game.Screens.Multi.Match.Components
private void updateChannel()
{
if (room.RoomID.Value != null)
Channel.Value = channelManager.JoinChannel(new Channel { Id = room.ChannelId, Type = ChannelType.Multiplayer, Name = $"#mp_{room.RoomID}" });
Channel.Value = channelManager?.JoinChannel(new Channel { Id = room.ChannelId, Type = ChannelType.Multiplayer, Name = $"#mp_{room.RoomID}" });
}
}
}