aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-11-24 12:29:21 +0200
committerRiccardo Spagni <ric@spagni.net>2016-11-24 12:29:21 +0200
commit0d2228553bd6a1d9cc0629b550d266a5b0ccb1fa (patch)
tree30c56e3028361a7b54a6b10819b40a7defdc642b
parent08fb1407309a5a847fb7c975c6653707fd228af3 (diff)
parent708eb43c3e80dbebaf5f9c60fd8200b44d01ce3a (diff)
downloadmonzero-gui-0d2228553bd6a1d9cc0629b550d266a5b0ccb1fa.tar.gz
monzero-gui-0d2228553bd6a1d9cc0629b550d266a5b0ccb1fa.tar.xz
monzero-gui-0d2228553bd6a1d9cc0629b550d266a5b0ccb1fa.zip
Merge pull request #185
708eb43 Fix crash on exit if cancelling open and exiting (moneromooo.monero)
-rw-r--r--main.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/main.qml b/main.qml
index 7e84b4af..a4bc66b3 100644
--- a/main.qml
+++ b/main.qml
@@ -603,7 +603,10 @@ ApplicationWindow {
walletInitialized = false;
splashCounter = 0;
// we can't close async here. Gui crashes if wallet is open
- walletManager.closeWallet(currentWallet);
+ if (currentWallet != undefined) {
+ walletManager.closeWallet(currentWallet);
+ currentWallet = undefined
+ }
wizard.restart();
rootItem.state = "wizard"
@@ -1026,6 +1029,9 @@ ApplicationWindow {
}
onClosing: {
// Close and save to disk on app close
- walletManager.closeWallet(currentWallet);
+ if (currentWallet != undefined) {
+ walletManager.closeWallet(currentWallet);
+ currentWallet = undefined
+ }
}
}