prevent traceback when we click on Rename in accounts window, but no account is selected. Fixes #5019

This commit is contained in:
Yann Leboulanger 2009-05-10 19:37:39 +00:00
parent f02dcaca6a
commit 1290a751e1

View file

@ -1720,6 +1720,8 @@ class AccountsWindow:
remove(account)
def on_rename_button_clicked(self, widget):
if not self.current_account:
return
enable = gajim.config.get('enable_zeroconf')
if (self.current_account != gajim.ZEROCONF_ACC_NAME or enable) and \
gajim.connections[self.current_account].connected != 0: