From 1efed181443436fdce7a08f3d0c727738804d663 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 12 Apr 2023 21:05:32 +0300 Subject: fixes #3481 (crash in ICQ) --- protocols/ICQ-WIM/src/server.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'protocols/ICQ-WIM/src/server.cpp') diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index d4a8299cf2..e2ba716d97 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -140,7 +140,7 @@ IcqFileInfo* CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, bool &b return nullptr; // is it a sticker? - if (pFileInfo->bIsSticker) { + if (pFileInfo && pFileInfo->bIsSticker) { if (ServiceExists(MS_SMILEYADD_LOADCONTACTSMILEYS)) { auto *pNew = new AsyncHttpRequest(CONN_NONE, REQUEST_GET, pFileInfo->szUrl, &CIcqProto::OnGetSticker); pNew->flags |= NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT; @@ -479,8 +479,10 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo if (!bCreateRead && !bIsOutgoing && wszText.Left(26) == L"https://files.icq.net/get/") { pFileInfo = CheckFile(hContact, wszText, bIsFileTransfer); - if (!pFileInfo) + if (!pFileInfo) { + debugLogA("Some shit happened, report this case to developers"); return; + } for (auto &jt : it["parts"]) { CMStringW wszDescr(jt["captionedContent"]["caption"].as_mstring()); -- cgit v1.2.3