diff --git a/src/common/contacts.py b/src/common/contacts.py index 8a55e0b81..64cdcda87 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -840,6 +840,8 @@ class MetacontactManager(): # we want one nearby_family per account nearby_family = [data for data in family if account == data['account']] + if not nearby_family: + return (None, None, None) big_brother_data = self._get_metacontacts_big_brother(nearby_family) big_brother_jid = big_brother_data['jid'] big_brother_account = big_brother_data['account'] diff --git a/src/roster_window.py b/src/roster_window.py index a289874f6..e60666078 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -491,6 +491,8 @@ class RosterWindow: nearby_family, big_brother_jid, big_brother_account = \ self._get_nearby_family_and_big_brother(family, account) + if not big_brother_jid: + return [] big_brother_contact = gajim.contacts.get_first_contact_from_jid( big_brother_account, big_brother_jid)