fix traceback when enabling an account. Fixes #5537

This commit is contained in:
Yann Leboulanger 2010-01-02 22:22:25 +01:00
parent 73f18abfc5
commit 001c4b993e
1 changed files with 2 additions and 1 deletions

View File

@ -2446,7 +2446,8 @@ class AccountsWindow:
def on_enable_checkbutton1_toggled(self, widget):
if self.ignore_events:
return
if gajim.connections[self.current_account].connected > 0:
if self.current_account in gajim.connections and \
gajim.connections[self.current_account].connected > 0:
# connecting or connected
self.ignore_events = True
self.xml.get_widget('enable_checkbutton1').set_active(True)