From c7e7445f5c68ab9a9196cc3db5d3bba32292f8da Mon Sep 17 00:00:00 2001 From: Mikhail Rogachev Date: Thu, 21 Mar 2024 20:43:51 +0100 Subject: [PATCH] Fix: ignore nil contact 'IsDisplayNameDupeOfCommunityMember' (#4956) --- protocol/messenger_communities.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocol/messenger_communities.go b/protocol/messenger_communities.go index ad9d6333b..d2e3765ff 100644 --- a/protocol/messenger_communities.go +++ b/protocol/messenger_communities.go @@ -614,6 +614,9 @@ func (m *Messenger) IsDisplayNameDupeOfCommunityMember(name string) (bool, error for _, community := range append(controlled, joined...) { for memberKey := range community.Members() { contact := m.GetContactByID(memberKey) + if contact == nil { + continue + } if strings.Compare(contact.DisplayName, name) == 0 { return true, nil }