From b3061e352adfb4620fe407e59bcbe91d766669b9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Nov 2022 19:56:08 +0300 Subject: rare crash fix --- protocols/WhatsApp/src/iq.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/WhatsApp/src/iq.cpp b/protocols/WhatsApp/src/iq.cpp index 474a54a376..6700b4e04a 100644 --- a/protocols/WhatsApp/src/iq.cpp +++ b/protocols/WhatsApp/src/iq.cpp @@ -97,8 +97,8 @@ void WhatsAppProto::OnIqGetKeys(const WANode &node, void *pUserInfo) m_signalStore.injectSession(it); // don't forget to send delayed message when all keys are retrieved - if (auto *pTask = (WASendTask *)pUserInfo) - SendTask(pTask); + if (pUserInfo != INVALID_HANDLE_VALUE) + SendTask((WASendTask *)pUserInfo); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -122,7 +122,7 @@ void WhatsAppProto::OnIqGetUsync(const WANode &node) pKey->addChild("user")->addAttr("jid", it->toString()); } if (pKey->getChildren().getCount() > 0) - WSSendNode(iq, &WhatsAppProto::OnIqGetKeys, nullptr); + WSSendNode(iq, &WhatsAppProto::OnIqGetKeys, INVALID_HANDLE_VALUE); } } -- cgit v1.2.3