From d7c5230573f509e4160fb8de107285516c83aebd Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard <jim@lapin.org> Date: Fri, 19 May 2006 02:42:54 +0000 Subject: [PATCH] Do not try to remove item from roster if contact is not in roster. Fixes #1967. --- src/gajim.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index ec456989d9..3d909dfb65 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1108,7 +1108,8 @@ class Interface: if not gajim.config.get('showoffline'): contact = gajim.contacts.get_contact_with_highest_priority(account, jid) - self.roster.really_remove_contact(contact, account) + if contact: + self.roster.really_remove_contact(contact, account) self.redraw_roster_systray(account, jid, typ) def remove_event(self, account, jid, event): @@ -1122,7 +1123,8 @@ class Interface: if not gajim.config.get('showoffline'): contact = gajim.contacts.get_contact_with_highest_priority(account, jid) - self.roster.really_remove_contact(contact, account) + if contact: + self.roster.really_remove_contact(contact, account) self.redraw_roster_systray(account, jid, event[0]) def handle_event_file_request_error(self, account, array): -- GitLab