summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_privacy.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-09-17 19:45:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-09-17 19:45:27 +0300
commit5d2c869e92a471e883990a0d18f4a1b37a5e10ad (patch)
tree2ed9f19e1264c6d9e9ced51bacd8c720a300767b /protocols/JabberG/src/jabber_privacy.cpp
parent95ccdfb59e87ac211685a65509123eceb72f6077 (diff)
fixes #2567 (Jabber: <none> privacy list should not allow change it settings)
Diffstat (limited to 'protocols/JabberG/src/jabber_privacy.cpp')
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index 4bf4972083..98b3a323fc 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -1102,13 +1102,13 @@ lbl_return:
bListsModified = m_proto->m_privacyListManager.IsModified() || clc_info.bChanged;
}
+ int nListSet = m_lbLists.GetCurSel();
int nCurSel = m_lbRules.GetCurSel();
int nItemCount = m_lbRules.GetCount();
- BOOL bSelected = nCurSel != CB_ERR;
- BOOL bListSelected = m_lbLists.GetCount();
- bListSelected = bListSelected && (m_lbLists.GetCurSel() != LB_ERR);
- bListSelected = bListSelected && m_lbLists.GetItemData(m_lbLists.GetCurSel());
+ bool bSelected = nCurSel != CB_ERR;
+ bool bListSelected = (m_lbLists.GetCount() != 0) && (nListSet != LB_ERR) && (m_lbLists.GetItemData(nListSet) != 0);
+ m_clcClist.Enable(bListsLoaded && bListSelected);
m_edtNewJid.Enable(bListsLoaded && bListSelected);
m_btnAddJid.Enable(bListsLoaded && bListSelected);
m_btnAddRule.Enable(bListsLoaded && bListSelected);