From 14879acd83c28391fc0f2b588a2f00fe47afbe3f Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 21 Dec 2018 13:26:50 +0900 Subject: [PATCH] Fix possible nullref --- osu.Game/Screens/Multi/Match/Components/HostInfo.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Multi/Match/Components/HostInfo.cs b/osu.Game/Screens/Multi/Match/Components/HostInfo.cs index 883f88b056..01b84bd40b 100644 --- a/osu.Game/Screens/Multi/Match/Components/HostInfo.cs +++ b/osu.Game/Screens/Multi/Match/Components/HostInfo.cs @@ -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"); + } } } }