summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_disco.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-28 11:47:11 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-28 11:47:11 +0000
commita1009bf5a26ec6e13badf360278765ea8c0f0edd (patch)
tree3deac61399b3d6cf9a5237622833fe9098550191 /protocols/JabberG/src/jabber_disco.cpp
parente44d626b32c534cace3a54d54778dfa9cf3599c9 (diff)
Jabber:
-minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_disco.cpp')
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index 9dd0f97267..a2ab2eb010 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -631,8 +631,6 @@ void CJabberDlgDiscovery::OnInitDialog()
// TranslateDialogDefault(m_hwnd);
WindowSetIcon(m_hwnd, m_proto, "servicediscovery");
- int i;
-
if (m_jid) {
SetDlgItemText(m_hwnd, IDC_COMBO_JID, m_jid);
SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
@@ -677,7 +675,7 @@ void CJabberDlgDiscovery::OnInitDialog()
TreeList_Create(hwndList);
TreeList_AddIcon(hwndList, m_proto->LoadIconEx("main"), 0);
- for (i=0; i < SIZEOF(sttNodeIcons); i++)
+ for (int i=0; i < SIZEOF(sttNodeIcons); i++)
{
bool needDestroy = false;
HICON hIcon;
@@ -1381,12 +1379,13 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
item = ListGetItemPtr(LIST_BOOKMARK, pNode->GetJid());
if (item == NULL) {
item = ListAdd(LIST_ROOM, pNode->GetJid());
+ if (item == NULL)
+ break;
item->name = mir_tstrdup(pNode->GetName());
}
- if (item != NULL) {
- item->type = _T("conference");
- AddEditBookmark(item);
- }
+
+ item->type = _T("conference");
+ AddEditBookmark(item);
}
}
break;