mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 20:20:02 +00:00
async close: make sure curretWallet isn't used after shutdown started
This commit is contained in:
parent
eb97bda3a3
commit
7fd80a1be2
1 changed files with 5 additions and 0 deletions
5
main.qml
5
main.qml
|
@ -135,6 +135,7 @@ ApplicationWindow {
|
||||||
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
||||||
console.log("Daemon change - closing " + currentWallet)
|
console.log("Daemon change - closing " + currentWallet)
|
||||||
walletManager.closeWalletAsync();
|
walletManager.closeWalletAsync();
|
||||||
|
currentWallet = undefined
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// set page to transfer if not changing daemon
|
// set page to transfer if not changing daemon
|
||||||
|
@ -221,6 +222,8 @@ ApplicationWindow {
|
||||||
console.error("Error opening wallet with empty password: ", wallet.errorString);
|
console.error("Error opening wallet with empty password: ", wallet.errorString);
|
||||||
console.log("closing wallet async : " + wallet.address)
|
console.log("closing wallet async : " + wallet.address)
|
||||||
walletManager.closeWalletAsync()
|
walletManager.closeWalletAsync()
|
||||||
|
currentWallet = undefined
|
||||||
|
|
||||||
// try to open wallet with password;
|
// try to open wallet with password;
|
||||||
passwordDialog.open(wallet.path);
|
passwordDialog.open(wallet.path);
|
||||||
} else {
|
} else {
|
||||||
|
@ -232,6 +235,7 @@ ApplicationWindow {
|
||||||
informationPopup.icon = StandardIcon.Critical
|
informationPopup.icon = StandardIcon.Critical
|
||||||
console.log("closing wallet async : " + wallet.address)
|
console.log("closing wallet async : " + wallet.address)
|
||||||
walletManager.closeWalletAsync();
|
walletManager.closeWalletAsync();
|
||||||
|
currentWallet = undefined
|
||||||
informationPopup.open()
|
informationPopup.open()
|
||||||
informationPopup.onCloseCallback = function() {
|
informationPopup.onCloseCallback = function() {
|
||||||
passwordDialog.open(wallet.path)
|
passwordDialog.open(wallet.path)
|
||||||
|
@ -612,6 +616,7 @@ ApplicationWindow {
|
||||||
walletInitialized = false;
|
walletInitialized = false;
|
||||||
splashCounter = 0;
|
splashCounter = 0;
|
||||||
walletManager.closeWalletAsync();
|
walletManager.closeWalletAsync();
|
||||||
|
currentWallet = undefined
|
||||||
wizard.restart();
|
wizard.restart();
|
||||||
rootItem.state = "wizard"
|
rootItem.state = "wizard"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue