mirror of https://github.com/ppy/osu
User and colors can not be null in UserPanel.cs
This commit is contained in:
parent
2518b5e9a0
commit
e430256b09
|
@ -38,6 +38,9 @@ public class UserPanel : ClickableContainer, IHasContextMenu
|
|||
|
||||
public UserPanel(User user)
|
||||
{
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
|
||||
this.user = user;
|
||||
|
||||
Height = height - status_height;
|
||||
|
@ -173,6 +176,9 @@ public UserPanel(User user)
|
|||
[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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue