1
0

qml: LoadingWalletDialog: fix ressource leak

When closing the OpenWalletDialog without unlocking a wallet the
LoadingWalletDialog wouldn't get properly cleaned up as the
LoadingWalletDialog.visible was never set true. This causes the
connections to accumulate and the callbacks won't get unregistered after
closing the LoadingWalletDialog again.
This commit is contained in:
f321x
2025-12-16 16:36:04 +01:00
parent 70084750ef
commit ba379b7da4

View File

@@ -44,7 +44,13 @@ ElDialog {
console.log('daemon loading ' + Daemon.loading)
if (!Daemon.loading) {
showTimer.stop()
dialog.close()
if (dialog.visible) {
dialog.close()
} else {
// if the dialog wasn't visible its onClosed callbacks don't get called, so it
// needs to be destroyed manually
Qt.callLater(function() { dialog.destroy() })
}
}
}
}