Fix possible nullref

This commit is contained in:
smoogipoo 2018-12-21 13:26:50 +09:00
parent e27b7b0c0d
commit 14879acd83
1 changed files with 6 additions and 3 deletions

View File

@ -43,9 +43,12 @@ public HostInfo(Room room)
}
};
linkContainer.AddText("hosted by");
linkContainer.NewLine();
linkContainer.AddLink(room.Host.Value.Username, null, LinkAction.OpenUserProfile, room.Host.Value.Id.ToString(), "View Profile", s => s.Font = "Exo2.0-BoldItalic");
if (room.Host.Value != null)
{
linkContainer.AddText("hosted by");
linkContainer.NewLine();
linkContainer.AddLink(room.Host.Value.Username, null, LinkAction.OpenUserProfile, room.Host.Value.Id.ToString(), "View Profile", s => s.Font = "Exo2.0-BoldItalic");
}
}
}
}