From b798a0bbb1f784fa6f7330db6b81ee2ba3a6f483 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 23 Feb 2015 12:15:43 +0000 Subject: VKontakte: minor logic fix (detect by coverity) git-svn-id: http://svn.miranda-ng.org/main/trunk@12245 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 43e5416ca2..173dd76f66 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -896,18 +896,20 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates) case VKPOLL_USR_ONLINE: uid = -json_as_int(json_at(pChild, 1)); - if ((hContact = FindUser(uid)) != NULL) + if ((hContact = FindUser(uid)) != NULL) { setWord(hContact, "Status", ID_STATUS_ONLINE); - platform = json_as_int(json_at(pChild, 2)); - SetMirVer(hContact, platform); + platform = json_as_int(json_at(pChild, 2)); + SetMirVer(hContact, platform); + } break; case VKPOLL_USR_OFFLINE: uid = -json_as_int(json_at(pChild, 1)); - if ((hContact = FindUser(uid)) != NULL) + if ((hContact = FindUser(uid)) != NULL) { setWord(hContact, "Status", ID_STATUS_OFFLINE); db_unset(hContact, m_szModuleName, "ListeningTo"); SetMirVer(hContact, -1); + } break; case VKPOLL_USR_UTN: -- cgit v1.2.3