mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
Fix crash on exit if cancelling open and exiting
This commit is contained in:
parent
c83336cc47
commit
708eb43c3e
1 changed files with 8 additions and 2 deletions
10
main.qml
10
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue