From 61c27375faba3a3a800d0a9a35ae3c15222f9500 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 30 Dec 2005 11:48:43 +0000 Subject: [PATCH] prevent TB --- src/roster_window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index 726d7132d..731a82af1 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2402,10 +2402,14 @@ _('If "%s" accepts this request you will know his or her status.') %jid) if type1 == 'contact': lcontact1 = gajim.contacts.get_contact(account1, jid1) contact1 = gajim.contacts.get_first_contact_from_jid(account1, jid1) + if not contact1: + return 0 name1 = contact1.name if type2 == 'contact': - lcontact2 = gajim.contacts.get_contact(account1, jid2) + lcontact2 = gajim.contacts.get_contact(account2, jid2) contact2 = gajim.contacts.get_first_contact_from_jid(account2, jid2) + if not contact2: + return 0 name2 = contact2.name # We first compare by show if sort_by_show is True if type1 == 'contact' and type2 == 'contact' and \