Do not try to remove item from roster if contact is not in roster. Fixes #1967.

This commit is contained in:
Jean-Marie Traissard 2006-05-19 02:42:54 +00:00
parent d4c11be06d
commit d7c5230573
1 changed files with 4 additions and 2 deletions

View File

@ -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):