From dc0a59b619ed0959e3e2b6c58664fd044d07b0b2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Nov 2022 20:13:40 +0300 Subject: fix for a possible crash --- protocols/WhatsApp/src/appsync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/WhatsApp/src/appsync.cpp') 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; -- cgit v1.2.3