summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-09-09 19:55:47 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-09-09 19:55:47 +0000
commitde6aee9cbcaaa3c1dce0f321a141b4b9b1deb614 (patch)
tree843d4f92699e29e9ac093e167d7730647ceb5787 /protocols/Tox
parent56c1f62b71e28b12e83e4ee7999461f73a3367fb (diff)
Tox: fixed contacts removing
git-svn-id: http://svn.miranda-ng.org/main/trunk@10413 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/tox_contacts.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index 04d7286524..ac022896ab 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -143,6 +143,11 @@ int CToxProto::OnContactDeleted(MCONTACT hContact, LPARAM lParam)
std::vector<uint8_t> id;
if (!db_get(hContact, m_szModuleName, TOX_SETTINGS_ID, &dbv))
{
+ if (dbv.type != DBVT_BLOB)
+ {
+ return 0;
+ }
+
memcpy(&id[0], dbv.pbVal, TOX_CLIENT_ID_SIZE);
db_free(&dbv);