From e430256b092c1cc3bfdfbaae75d3a6ec788d24d2 Mon Sep 17 00:00:00 2001 From: Miterosan Date: Tue, 7 Nov 2017 22:51:06 +0100 Subject: [PATCH] User and colors can not be null in UserPanel.cs --- osu.Game/Users/UserPanel.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Users/UserPanel.cs b/osu.Game/Users/UserPanel.cs index e5518b5845..706ad86bfc 100644 --- a/osu.Game/Users/UserPanel.cs +++ b/osu.Game/Users/UserPanel.cs @@ -38,6 +38,9 @@ namespace osu.Game.Users public UserPanel(User user) { + if (user == null) + throw new ArgumentNullException(nameof(user)); + this.user = user; Height = height - status_height; @@ -173,6 +176,9 @@ namespace osu.Game.Users [BackgroundDependencyLoader(permitNulls: true)] private void load(OsuColour colours, UserProfileOverlay profile) { + if (colours == null) + throw new ArgumentNullException(nameof(colours)); + Status.ValueChanged += displayStatus; Status.ValueChanged += status => statusBg.FadeColour(status?.GetAppropriateColour(colours) ?? colours.Gray5, 500, Easing.OutQuint);