summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/ICQ-WIM/src/proto.cpp')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index 83fb342dec..9cade4f8d9 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -351,6 +351,7 @@ HANDLE CIcqProto::FileAllow(MCONTACT, HANDLE hTransfer, const wchar_t *pwszSaveP
auto *ft = (IcqFileTransfer *)hTransfer;
ft->m_wszFileName.Insert(0, pwszSavePath);
ft->pfts.szCurrentFile.w = ft->m_wszFileName.GetBuffer();
+ ft->Acquire();
auto *pReq = new AsyncHttpRequest(CONN_NONE, REQUEST_GET, ft->m_szHost, &CIcqProto::OnFileRecv);
pReq->pUserInfo = ft;
@@ -370,7 +371,7 @@ int CIcqProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
if (ft->pfts.currentFileTime != 0)
ft->m_bCanceled = true;
else
- delete ft;
+ ft->Release();
return 0;
}