core: fixed crash when roster list is empty
This commit is contained in:
parent
8853328b6f
commit
80327010ed
1 changed files with 4 additions and 3 deletions
|
|
@ -624,9 +624,10 @@ class Memory:
|
|||
error(_('Asking contacts for a non-existant profile'))
|
||||
return []
|
||||
ret=[]
|
||||
for contact in self.contacts[profile]:
|
||||
attr, groups = self.contacts[profile][contact]
|
||||
ret.append([contact, attr, groups ])
|
||||
if self.contacts.has_key(profile):
|
||||
for contact in self.contacts[profile]:
|
||||
attr, groups = self.contacts[profile][contact]
|
||||
ret.append([contact, attr, groups ])
|
||||
return ret
|
||||
|
||||
def addPresenceStatus(self, contact_jid, show, priority, statuses, profile_key='@DEFAULT@'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue