From 500da0fe0acbfad5ae0d7e5b8ad70622bf6d62cb Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Tue, 28 Nov 2017 15:08:02 +0500 Subject: VKontakte: crash fix --- protocols/VKontakte/src/vk_chats.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3