From 9cdcdf2c5d4d651396239a5afcdf8877b390029f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 10 Feb 2020 12:23:00 +0100 Subject: [PATCH] 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 --- src/qt/walletframe.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index dd3cd6a53e..fe49099cc5 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)