From caab80f34652b4da1862647c7d6bc75c8ed0a46b Mon Sep 17 00:00:00 2001 From: ycc Date: Sun, 31 Mar 2024 17:58:41 +0200 Subject: [PATCH] Fix condition for saving server message in backgroundHelper.go for nil safety --- client/helpers/backgroundHelper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/helpers/backgroundHelper.go b/client/helpers/backgroundHelper.go index ebf42e6..313c785 100644 --- a/client/helpers/backgroundHelper.go +++ b/client/helpers/backgroundHelper.go @@ -77,7 +77,7 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string if err != nil { return -1, "CheckMessages: ProcessInboundServerResponse", err } - if len(fs_msg.Chat) > 0 || fs_msg.Invitation.Step == 3 { + if len(fs_msg.Chat) > 0 || (fs_msg.Invitation != nil && fs_msg.Invitation.Step == 3) { // chat or invitation answer => save the server message out, err := proto.Marshal(fs_msg)