From 16f02740d8d83924a2b271308db163fd0962d842 Mon Sep 17 00:00:00 2001 From: Archi Date: Tue, 21 Dec 2021 12:15:44 +0100 Subject: [PATCH] Handle AvatarHash NRE https://github.com/SteamRE/SteamKit/pull/1067 --- ArchiSteamFarm/Steam/Bot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs index 38a96c3b1..9568c3801 100644 --- a/ArchiSteamFarm/Steam/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -2996,7 +2996,7 @@ public sealed class Bot : IAsyncDisposable { string? avatarHash = null; - if ((callback.AvatarHash.Length > 0) && callback.AvatarHash.Any(static singleByte => singleByte != 0)) { + if ((callback.AvatarHash?.Length > 0) && callback.AvatarHash.Any(static singleByte => singleByte != 0)) { #pragma warning disable CA1308 // False positive, we're intentionally converting this part to lowercase and it's not used for any security decisions based on the result of the normalization avatarHash = Convert.ToHexString(callback.AvatarHash).ToLowerInvariant(); #pragma warning restore CA1308 // False positive, we're intentionally converting this part to lowercase and it's not used for any security decisions based on the result of the normalization