From d0e9ad719375abddd169c97699f4ef728857e801 Mon Sep 17 00:00:00 2001 From: spiral Date: Fri, 11 Feb 2022 12:09:58 -0500 Subject: [PATCH] fix: PKMessage.Member can be null --- PluralKit.Bot/Proxy/ProxyService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Proxy/ProxyService.cs b/PluralKit.Bot/Proxy/ProxyService.cs index 60384b36..e9666e2b 100644 --- a/PluralKit.Bot/Proxy/ProxyService.cs +++ b/PluralKit.Bot/Proxy/ProxyService.cs @@ -275,12 +275,12 @@ public class ProxyService return FixSameNameInner(proxyName); // last message was proxied by a different member - if (pkMessage.Member.Id != member.Id) + if (pkMessage.Member?.Id != member.Id) return FixSameNameInner(proxyName); } // if we fixed the name last message and it's the same member proxying, we want to fix it again - if (lastMessage.AuthorUsername == FixSameNameInner(proxyName) && pkMessage?.Member.Id == member.Id) + if (lastMessage.AuthorUsername == FixSameNameInner(proxyName) && pkMessage?.Member?.Id == member.Id) return FixSameNameInner(proxyName); // No issues found, current proxy name is fine.