summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-05-10 19:18:36 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-05-10 19:18:36 +0300
commit02e7ae964ebe60b8ff42a914eb6fe61ed3b299c6 (patch)
tree20a0338227c823a77e3e0babfeec063f4b2f082c
parent16e163c3c7d256d3557386d500ff121fa1cf7955 (diff)
fix for a randon crash in WhatsApp
-rw-r--r--protocols/WhatsApp/src/message.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/WhatsApp/src/message.cpp b/protocols/WhatsApp/src/message.cpp
index 93420d8f33..cc6e9d8ff9 100644
--- a/protocols/WhatsApp/src/message.cpp
+++ b/protocols/WhatsApp/src/message.cpp
@@ -96,8 +96,7 @@ void WhatsAppProto::OnReceiveMessage(const WANode &node)
key.remotejid = szChatId.GetBuffer();
key.id = (char*)msgId;
key.fromme = bFromMe; key.has_fromme = true;
- if (participant)
- key.participant = (char*)participant;
+ key.participant = (char*)participant;
Wa__WebMessageInfo msg;
msg.key = &key;
@@ -300,15 +299,15 @@ void WhatsAppProto::ProcessMessage(WAMSG type, const Wa__WebMessageInfo &msg)
break;
case WA__WEB_MESSAGE_INFO__STUB_TYPE__GROUP_CHANGE_ANNOUNCE:
- debugLogA("Groupchat announce", participant);
+ debugLogA("Groupchat announce");
break;
case WA__WEB_MESSAGE_INFO__STUB_TYPE__GROUP_CHANGE_RESTRICT:
- debugLogA("Groupchat restriction", participant);
+ debugLogA("Groupchat restriction");
break;
case WA__WEB_MESSAGE_INFO__STUB_TYPE__GROUP_CHANGE_SUBJECT:
- debugLogA("Groupchat subject was changed", participant);
+ debugLogA("Groupchat subject was changed");
break;
}
}