Skip to content
Snippets Groups Projects
Commit c2e15ae9 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent traceback when closing single message window. Fixes #5292

parent 4d8454a2
No related branches found
No related tags found
No related merge requests found
...@@ -2505,6 +2505,9 @@ class SingleMessageWindow: ...@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment