fix(profile_showcase): fix crash when profile showcase message is nil (#4296) (#4311)

Partly fixes https://github.com/status-im/status-desktop/issues/12695
This commit is contained in:
Jonathan Rainville 2023-11-13 12:35:41 -05:00 committed by GitHub
parent de29ec71ae
commit 2076853ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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
}
}
}