From e7501093c8b41a28392a4ea8048be6ef143bbb3c Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Sun, 26 Apr 2015 02:19:28 +0200
Subject: [PATCH] Fixed bug when deleting an account ( issue #101 )

---
 src/cutecoin/gui/mainwindow.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/cutecoin/gui/mainwindow.py b/src/cutecoin/gui/mainwindow.py
index 60723d18..05912506 100644
--- a/src/cutecoin/gui/mainwindow.py
+++ b/src/cutecoin/gui/mainwindow.py
@@ -206,7 +206,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
         dialog = ProcessConfigureAccount(self.app, self.app.current_account)
         result = dialog.exec_()
         if result == QDialog.Accepted:
-            self.action_change_account(self.app.current_account.name)
+            if self.app.current_account:
+                self.action_change_account(self.app.current_account.name)
+            else:
+                self.refresh()
 
     def open_about_popup(self):
         """
-- 
GitLab