summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-11-28 15:08:02 +0500
committerElzorFox <elzorfox@ya.ru>2017-11-28 15:09:02 +0500
commit500da0fe0acbfad5ae0d7e5b8ad70622bf6d62cb (patch)
tree407f55d39df48c95f360932798f6af0d8d12bc38 /protocols/VKontakte
parent0759aacd40cb8e2f2de47634a6043d8a1c35dcda (diff)
VKontakte: crash fix
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 253856cd97..e1c7f76840 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -61,8 +61,10 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
c->m_wszId = mir_wstrdup(sid);
GCSessionInfoBase *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, sid, wszTitle);
- c->m_hContact = si->hContact;
+ if (si == nullptr)
+ return nullptr;
+ c->m_hContact = si->hContact;
setWString(si->hContact, "Nick", wszTitle);
m_chats.insert(c);