summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-02-23 12:15:43 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-02-23 12:15:43 +0000
commitb798a0bbb1f784fa6f7330db6b81ee2ba3a6f483 (patch)
tree1d700b538443ec748757627dae52ed1703f21179
parent7e2c6c5767a1df4f2edaea2ab4dec7b02c36a8cb (diff)
VKontakte: minor logic fix (detect by coverity)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12245 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp10
1 files 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: