From 5d2c869e92a471e883990a0d18f4a1b37a5e10ad Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 Sep 2020 19:45:27 +0300 Subject: fixes #2567 (Jabber: privacy list should not allow change it settings) --- protocols/JabberG/src/jabber_privacy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/JabberG/src') 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); -- cgit v1.2.3