From c717b5217269b698f8f30ef30fceef984c17b162 Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Thu, 25 Feb 2021 13:35:27 -0800 Subject: [PATCH] fixed a potential segfault --- network/message/handler.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/network/message/handler.go b/network/message/handler.go index 93f6005a3..4a665a5d4 100644 --- a/network/message/handler.go +++ b/network/message/handler.go @@ -112,12 +112,11 @@ func (m *Manager) handleMessage(ecrMsg format.Message, identity reception.Identi xxMsg, ok := m.partitioner.HandlePartition(sender, encTy, msg.GetContents(), relationshipFingerprint) - //Set the identities - xxMsg.RecipientID = identity.Source - xxMsg.EphemeralID = identity.EphId - // If the reception completed a message, hear it on the switchboard if ok { + //Set the identities + xxMsg.RecipientID = identity.Source + xxMsg.EphemeralID = identity.EphId xxMsg.Encryption = encTy if xxMsg.MessageType == message.Raw { jww.WARN.Panicf("Recieved a message of type 'Raw' from %s."+ -- GitLab