fix(@desktop): crash on shutdown path

This commit is contained in:
Andrei Smirnov 2021-08-12 14:26:08 +03:00 committed by Andrei Smirnov
parent 69a6d06fea
commit c4104b9b32
2 changed files with 11 additions and 4 deletions

View File

@ -23,8 +23,14 @@ QtObject:
proc delete(self: WalletView) =
self.accountsView.delete
self.collectiblesView.delete
self.transactionsView.delete
self.tokensView.delete
self.dappBrowserView.delete
self.gasView.delete
self.ensView.delete
self.historyView.delete
self.balanceView.delete
self.utilsView.delete
self.QAbstractListModel.delete

View File

@ -45,10 +45,6 @@ proc mainProc() =
status.tasks.marathon.registerWorker(mailserverWorker)
status.initNode()
defer:
info "Status app is shutting down..."
status.tasks.teardown()
enableHDPI()
initializeOpenGL()
@ -185,6 +181,11 @@ proc mainProc() =
node.init()
wallet.checkPendingTransactions()
# this should be the last defer in the scope
defer:
info "Status app is shutting down..."
status.tasks.teardown()
engine.setRootContextProperty("loginModel", login.variant)
engine.setRootContextProperty("onboardingModel", onboarding.variant)