main: verify if currentWallet is loaded before calling it

This commit is contained in:
rating89us 2021-12-10 11:03:37 +01:00 committed by GitHub
parent bddb9b0050
commit 008a38aae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -730,14 +730,18 @@ ApplicationWindow {
function onDaemonStarted(){ function onDaemonStarted(){
console.log("daemon started"); console.log("daemon started");
daemonStartStopInProgress = 0; daemonStartStopInProgress = 0;
currentWallet.connected(true); if (currentWallet) {
// resume refresh currentWallet.connected(true);
currentWallet.startRefresh(); // resume refresh
currentWallet.startRefresh();
}
// resume simplemode connection timer // resume simplemode connection timer
appWindow.disconnectedEpoch = Utils.epoch(); appWindow.disconnectedEpoch = Utils.epoch();
} }
function onDaemonStopped(){ function onDaemonStopped(){
currentWallet.connected(true); if (currentWallet) {
currentWallet.connected(true);
}
} }
function onDaemonStartFailure(error) { function onDaemonStartFailure(error) {