diff --git a/src/groupchat_control.py b/src/groupchat_control.py index ac45f6b75..4f5be299c 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1759,7 +1759,8 @@ class GroupchatControl(ChatControlBase): def shutdown(self, status='offline'): # destroy banner tooltip - bug #pygtk for that! self.subject_tooltip.destroy() - if gajim.gc_connected[self.account][self.room_jid]: + if self.room_jid in gajim.gc_connected[self.account] and \ + gajim.gc_connected[self.account][self.room_jid]: # Tell connection to note the date we disconnect to avoid duplicate # logs. We do it only when connected because if connection was lost # there may be new messages since disconnection.