summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-12 21:05:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-12 21:05:32 +0300
commit1efed181443436fdce7a08f3d0c727738804d663 (patch)
tree95b34111bf71ff9f812cd89554df0549456533ea /protocols
parenta152440377a65b9ea4246f33b9e176a09161cf67 (diff)
fixes #3481 (crash in ICQ)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp6
1 files changed, 4 insertions, 2 deletions
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());