summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/menus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/ICQ-WIM/src/menus.cpp')
-rw-r--r--protocols/ICQ-WIM/src/menus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/menus.cpp b/protocols/ICQ-WIM/src/menus.cpp
index ddfa5f0745..4cb75fe7b0 100644
--- a/protocols/ICQ-WIM/src/menus.cpp
+++ b/protocols/ICQ-WIM/src/menus.cpp
@@ -48,18 +48,18 @@ INT_PTR CIcqProto::SvcExecMenu(WPARAM iCommand, LPARAM pHandle)
IcqFileInfo *pFileInfo = nullptr;
CMStringW wszText(ptrW(DbEvent_GetTextW(&dbei, CP_UTF8)));
if (CheckFile(db_event_getContact(hEvent), wszText, pFileInfo)) {
- if (pFileInfo->bIsSticker) {
+ if (!pFileInfo || pFileInfo->bIsSticker) {
// sticker is a simple text message prcoessed by SmileyAdd
T2Utf szBody(wszText);
mir_free(dbei.pBlob);
- dbei.pBlob = (uint8_t*)szBody.get();
dbei.cbBlob = (int)mir_strlen(szBody.get());
+ dbei.pBlob = (uint8_t*)szBody.detach();
}
else {
// create the offline file event
dbei.eventType = EVENTTYPE_FILE;
- DB::FILE_BLOB blob(pFileInfo->wszDescr, L"");
+ DB::FILE_BLOB blob(pFileInfo->wszDescr, wszText);
blob.setUrl(pFileInfo->szOrigUrl);
blob.setSize(pFileInfo->dwFileSize);
blob.write(dbei);