prevent traceback when closing single message window. Fixes #5292

This commit is contained in:
Yann Leboulanger 2009-09-29 13:51:20 +02:00
parent 4d8454a242
commit c2e15ae9d2
1 changed files with 3 additions and 0 deletions

View File

@ -2505,6 +2505,9 @@ class SingleMessageWindow:
self.instances.remove(self) self.instances.remove(self)
c = gajim.contacts.get_contact_with_highest_priority(self.account, c = gajim.contacts.get_contact_with_highest_priority(self.account,
self.from_whom) self.from_whom)
if not c:
# Groupchat is maybe already destroyed
return
if c.is_groupchat() and not self.from_whom in \ if c.is_groupchat() and not self.from_whom in \
gajim.interface.minimized_controls[self.account] and self.action == \ gajim.interface.minimized_controls[self.account] and self.action == \
'receive' and gajim.events.get_nb_roster_events(self.account, 'receive' and gajim.events.get_nb_roster_events(self.account,