fix traceback when no control is opened. fixes #4024, #4028

This commit is contained in:
Yann Leboulanger 2008-06-17 05:39:20 +00:00
parent 16c7dfca91
commit 5e5733e40a
1 changed files with 3 additions and 1 deletions

View File

@ -2749,7 +2749,9 @@ class Interface:
win = self.msg_win_mgr.get_window(fjid, account)
if win:
ctrl = win.get_controls(fjid, account)[0]
ctrls = win.get_controls(fjid, account)
if ctrls:
ctrl = ctrls[0]
if not ctrl:
ctrl = self.new_chat(contact, account,