From 0c1f624b56f662bedaee8b530fa9584e9753b59b Mon Sep 17 00:00:00 2001 From: ilsubyeega Date: Tue, 30 Mar 2021 17:03:01 +0900 Subject: [PATCH] Simply code under assuming that avatarUrl always non-null --- osu.Game/Users/Drawables/DrawableAvatar.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osu.Game/Users/Drawables/DrawableAvatar.cs b/osu.Game/Users/Drawables/DrawableAvatar.cs index 930f1c07a1..ef074813a5 100644 --- a/osu.Game/Users/Drawables/DrawableAvatar.cs +++ b/osu.Game/Users/Drawables/DrawableAvatar.cs @@ -30,11 +30,8 @@ namespace osu.Game.Users.Drawables [BackgroundDependencyLoader] private void load(LargeTextureStore textures) { - string avatarUrl = user?.AvatarUrl; - if (avatarUrl != null) - Texture = textures.Get(avatarUrl); - else if (user != null && user.Id > 1) - Texture = textures.Get($@"https://a.ppy.sh/{user.Id}"); + if (user != null && user.Id > 1) + Texture = textures.Get(user.AvatarUrl); Texture ??= textures.Get(@"Online/avatar-guest"); }