don't crash when we rename local account that is activated but zeroconf not available. Fixes #7511

This commit is contained in:
Yann Leboulanger 2013-10-31 10:15:55 +01:00
parent 22ea7bfcb8
commit ac9a67b269
1 changed files with 2 additions and 1 deletions

View File

@ -2060,7 +2060,8 @@ class AccountsWindow:
def on_rename_button_clicked(self, widget): def on_rename_button_clicked(self, widget):
if not self.current_account: if not self.current_account:
return return
active = gajim.config.get_per('accounts', self.current_account, 'active') active = gajim.config.get_per('accounts', self.current_account,
'active') and self.current_account in gajim.connections
if active and gajim.connections[self.current_account].connected != 0: if active and gajim.connections[self.current_account].connected != 0:
dialogs.ErrorDialog( dialogs.ErrorDialog(
_('You are currently connected to the server'), _('You are currently connected to the server'),