do not crash when we remove a contact for which neerby contcts are not in the same accounts. Fixes #8157
This commit is contained in:
parent
821b701a66
commit
8326e56793
|
@ -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']
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue