From 9b3e2e03c952e66e2e4b2d71fd9e334a8558e74a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 3 Oct 2014 22:48:14 +0200 Subject: [PATCH] don't allow to delete contacts from an offline account. Fixes #7822 --- src/roster_window.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/roster_window.py b/src/roster_window.py index 102b8fefb..ff5260c3e 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3459,9 +3459,13 @@ class RosterWindow: return jid = model[path][C_JID] account = model[path][C_ACCOUNT] + if not gajim.account_is_connected(account): + continue contact = gajim.contacts.get_contact_with_highest_priority( account, jid) list_.append((contact, account)) + if not list_: + return if type_ == 'contact': self.on_req_usub(widget, list_) elif type_ == 'agent':