diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-02-10 12:23:00 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-02-10 12:24:15 +0100 |
commit | 407d7c831aab92aaf80b1d7609835347bd72011a (patch) | |
tree | 982b4aacbcbd874fc5ff8cdf05213b9e36a7c7de | |
parent | 0193fd766bdef4913aab5e098b59871e6be71f1c (diff) | |
parent | 2af3e16ca917acd85c2d4f709f6d486519d6af0d (diff) |
Merge #18091: Qt: pass clientmodel changes from walletframe to walletviews
2af3e16ca917acd85c2d4f709f6d486519d6af0d Qt: pass clientmodel changes from walletframe to walletviews (Jonas Schnelli)
Pull request description:
Fixes #18090
We currently don't pass `clientmodel` changes from the `walletframe` to the `walletviews` leading to possible invalid access during shutdown because all walletviews miss the nullifying of the clientmodel.
TODO: needs investigation if this is should be backported.
ACKs for top commit:
laanwj:
Good catch, code review ACK 2af3e16ca917acd85c2d4f709f6d486519d6af0d
Tree-SHA512: f8c0a114f01deac07fb311112d144f3bfc1c1882dd19e8742b372dd597d7a5d59cd0af99fc50494de2334cad98d6701675317474e40fe8820d04c058aeca1b75
-rw-r--r-- | src/qt/walletframe.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 656fffd067..dac3326cc4 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -37,6 +37,10 @@ WalletFrame::~WalletFrame() void WalletFrame::setClientModel(ClientModel *_clientModel) { this->clientModel = _clientModel; + + for (auto i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) { + i.value()->setClientModel(_clientModel); + } } bool WalletFrame::addWallet(WalletModel *walletModel) |