From de6aee9cbcaaa3c1dce0f321a141b4b9b1deb614 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 9 Sep 2014 19:55:47 +0000 Subject: Tox: fixed contacts removing git-svn-id: http://svn.miranda-ng.org/main/trunk@10413 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_contacts.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 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); -- cgit v1.2.3