From 5212643f256d5cf75b295aeb42783c81ce033519 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 Apr 2016 11:11:39 +0000 Subject: preventing troubles with nick = NULL git-svn-id: http://svn.miranda-ng.org/main/trunk@16743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_list.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'protocols/JabberG/src/jabber_list.cpp') diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 25db1afe3e..e73e485194 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -87,6 +87,22 @@ void JABBER_RESOURCE_STATUS::Release() delete this; } +void CJabberProto::ListInit(void) +{ + for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { + if (isChatRoom(hContact)) { + ptrT jid(getTStringA(hContact, "ChatRoomID")); + if (jid != NULL) + ListAdd(LIST_CHATROOM, jid, hContact); + } + else { + ptrT jid(getTStringA(hContact, "jid")); + if (jid != NULL) + ListAdd(LIST_ROSTER, jid, hContact); + } + } +} + void CJabberProto::ListWipe(void) { mir_cslock lck(m_csLists); -- cgit v1.2.3