diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-11-07 18:04:53 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-11-07 18:04:53 +0000 |
commit | a50edcaccf9c335a8b4fd6dc144916f3aed9ca8f (patch) | |
tree | 9f5e085aa44ceb6a4474229fe2c0a20e367afa06 /protocols/Tox | |
parent | 0268c15724b0f8eff2e0b78bdd4ca4bc89c17559 (diff) |
Tox: fix crash on logout
git-svn-id: http://svn.miranda-ng.org/main/trunk@15696 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_transfer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index fef6258058..c4ebeb02b0 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -353,7 +353,8 @@ void CToxProto::CancelAllTransfers() for (size_t i = 0; i < transfers.Count(); i++)
{
FileTransferParam *transfer = transfers.GetAt(i);
- tox_file_control(toxThread->tox, transfer->friendNumber, transfer->fileNumber, TOX_FILE_CONTROL_CANCEL, NULL);
+ if (toxThread && toxThread->tox)
+ tox_file_control(toxThread->tox, transfer->friendNumber, transfer->fileNumber, TOX_FILE_CONTROL_CANCEL, NULL);
ProtoBroadcastAck(transfer->pfts.hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)transfer, 0);
transfers.Remove(transfer);
}
|