aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2016-12-14 13:11:20 +0100
committerJaquee <jaquee.monero@gmail.com>2016-12-14 13:11:20 +0100
commit7fd80a1be2bf91026d12b023c1ea9f5d58246b62 (patch)
tree6884b16f68ec13f1c70b03e385c4ffb741c4046e
parenteb97bda3a369c03d092ce92dcc0b3e28fdd57a8a (diff)
downloadmonzero-gui-7fd80a1be2bf91026d12b023c1ea9f5d58246b62.tar.gz
monzero-gui-7fd80a1be2bf91026d12b023c1ea9f5d58246b62.tar.xz
monzero-gui-7fd80a1be2bf91026d12b023c1ea9f5d58246b62.zip
async close: make sure curretWallet isn't used after shutdown started
-rw-r--r--main.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.qml b/main.qml
index 9cb918e9..44fd3f3e 100644
--- a/main.qml
+++ b/main.qml
@@ -135,6 +135,7 @@ ApplicationWindow {
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
console.log("Daemon change - closing " + currentWallet)
walletManager.closeWalletAsync();
+ currentWallet = undefined
} else {
// set page to transfer if not changing daemon
@@ -221,6 +222,8 @@ ApplicationWindow {
console.error("Error opening wallet with empty password: ", wallet.errorString);
console.log("closing wallet async : " + wallet.address)
walletManager.closeWalletAsync()
+ currentWallet = undefined
+
// try to open wallet with password;
passwordDialog.open(wallet.path);
} else {
@@ -232,6 +235,7 @@ ApplicationWindow {
informationPopup.icon = StandardIcon.Critical
console.log("closing wallet async : " + wallet.address)
walletManager.closeWalletAsync();
+ currentWallet = undefined
informationPopup.open()
informationPopup.onCloseCallback = function() {
passwordDialog.open(wallet.path)
@@ -612,6 +616,7 @@ ApplicationWindow {
walletInitialized = false;
splashCounter = 0;
walletManager.closeWalletAsync();
+ currentWallet = undefined
wizard.restart();
rootItem.state = "wizard"
}