diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-02 18:42:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-02 18:42:11 +0300 |
commit | 3253e019a8fec1dccbd5018a6f6195c248e335bc (patch) | |
tree | 418b59fa71f62a7284586df2da63e3f1aecad8c9 /protocols/Tox | |
parent | cfca10ee7adbf42b70183aedfe5bd16f7b09b44f (diff) |
fixes #1130 (Tox crash on reconnecting protocol)
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index d79ca5f61d..a7cfc3773f 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -117,7 +117,7 @@ void CToxProto::LoadFriendList(Tox *tox) size_t count = tox_self_get_friend_list_size(tox);
if (count > 0) {
uint32_t *friends = (uint32_t*)mir_alloc(count * sizeof(uint32_t));
- tox_self_get_friend_list(m_toxThread->Tox(), friends);
+ tox_self_get_friend_list(tox, friends);
for (size_t i = 0; i < count; i++) {
uint32_t friendNumber = friends[i];
@@ -133,13 +133,13 @@ void CToxProto::LoadFriendList(Tox *tox) TOX_ERR_FRIEND_QUERY getNameResult;
uint8_t nick[TOX_MAX_NAME_LENGTH] = { 0 };
- if (tox_friend_get_name(m_toxThread->Tox(), friendNumber, nick, &getNameResult))
+ if (tox_friend_get_name(tox, friendNumber, nick, &getNameResult))
setWString(hContact, "Nick", ptrW(mir_utf8decodeW((char*)nick)));
else
debugLogA(__FUNCTION__": failed to get friend name (%d)", getNameResult);
TOX_ERR_FRIEND_GET_LAST_ONLINE getLastOnlineResult;
- uint64_t timestamp = tox_friend_get_last_online(m_toxThread->Tox(), friendNumber, &getLastOnlineResult);
+ uint64_t timestamp = tox_friend_get_last_online(tox, friendNumber, &getLastOnlineResult);
if (getLastOnlineResult == TOX_ERR_FRIEND_GET_LAST_ONLINE_OK)
setDword(hContact, "LastEventDateTS", timestamp);
else
|