Fix exception when minimizing a groupchat

This commit is contained in:
Philipp Hörist 2017-05-06 11:29:23 +02:00
parent 6e8e5aec51
commit 37a313701c
1 changed files with 3 additions and 0 deletions

View File

@ -804,6 +804,9 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
"""
It gets called no matter if it is the active window or not
"""
if not self.parent_win:
# when a groupchat is minimized there is no parent window
return
if self.parent_win.get_active_jid() == self.contact.jid:
# if window is the active one, change vars assisting chatstate
self.mouse_over_in_last_5_secs = True