summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index c7a1e5259d..393a215079 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -813,7 +813,11 @@ void CVkProto::OnReceiveGroupInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR
if (!jnResponse)
return;
- for (auto &jnItem : jnResponse) {
+ const JSONNode& jnGroups = jnResponse["groups"];
+ if (!jnGroups)
+ return;
+
+ for (auto &jnItem : jnGroups) {
VKUserID_t iGroupId = (-1)*jnItem["id"].as_int();
bool bIsMember = jnItem["is_member"].as_bool();