From 2076853ce31f828dad891c454e4fb99f1c24b6c0 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 13 Nov 2023 12:35:41 -0500 Subject: [PATCH] fix(profile_showcase): fix crash when profile showcase message is nil (#4296) (#4311) Partly fixes https://github.com/status-im/status-desktop/issues/12695 --- protocol/messenger_handler.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/protocol/messenger_handler.go b/protocol/messenger_handler.go index d0a292a59..ab00ffeea 100644 --- a/protocol/messenger_handler.go +++ b/protocol/messenger_handler.go @@ -2927,9 +2927,11 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci *protobuf contactModified = true } - err := m.BuildProfileShowcaseFromIdentity(state, ci.ProfileShowcase) - if err != nil { - return err + if ci.ProfileShowcase != nil { + err := m.BuildProfileShowcaseFromIdentity(state, ci.ProfileShowcase) + if err != nil { + return err + } } }