Also check null for bindable channel value

This commit is contained in:
Joseph Madamba 2023-01-17 14:12:48 -08:00
parent 97bd76efc6
commit 254c881ded
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ public override float Width
private UserProfileOverlay? profileOverlay { get; set; }
[Resolved]
private Bindable<Channel>? currentChannel { get; set; }
private Bindable<Channel?>? currentChannel { get; set; }
private readonly APIUser user;
private readonly OsuSpriteText drawableText;
@ -161,7 +161,7 @@ public MenuItem[] ContextMenuItems
if (!user.Equals(api.LocalUser.Value))
items.Add(new OsuMenuItem(UsersStrings.CardSendMessage, MenuItemType.Standard, openUserChannel));
if (currentChannel != null)
if (currentChannel?.Value != null)
{
items.Add(new OsuMenuItem(ChatStrings.MentionUser, MenuItemType.Standard, () =>
{