summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-11-15 20:13:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-11-15 20:13:40 +0300
commitdc0a59b619ed0959e3e2b6c58664fd044d07b0b2 (patch)
tree140534b7676c5beab8452dea4f5f50a77d6ca632
parent1f52752c82ac31ca9a6f3dc5259bf2934b2fc3f6 (diff)
fix for a possible crash
-rw-r--r--protocols/WhatsApp/src/appsync.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/WhatsApp/src/appsync.cpp b/protocols/WhatsApp/src/appsync.cpp
index 5f17b2e765..1a0d1b2191 100644
--- a/protocols/WhatsApp/src/appsync.cpp
+++ b/protocols/WhatsApp/src/appsync.cpp
@@ -231,7 +231,7 @@ void WhatsAppProto::ApplyPatch(const JSONNode &index, const Wa__SyncActionValue
setUString(pUser->hContact, "FirstName", str.c_str());
setUString(pUser->hContact, "LastName", fullName + str.GetLength() + 1);
}
- else {
+ else if (fullName != nullptr) {
auto *p = strrchr(fullName, ' ');
if (p != 0) {
*p = 0;