diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2024-02-28 09:47:20 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2024-02-28 17:58:47 -0300 |
commit | f3a612f9016fe1f59c73d6059274bea8025b8940 (patch) | |
tree | e633a0fcae1e101b358b17f5779790ab2fba3d88 /src/qt/bitcoingui.cpp | |
parent | ba907f96ad37c09c49c0e1532fad118fcb8dd4a8 (diff) | |
download | bitcoin-f3a612f9016fe1f59c73d6059274bea8025b8940.tar.xz |
gui: guard accessing a nullptr 'clientModel'
During shutdown, already queue events dispatched from the backend such
'numConnectionsChanged' and 'networkActiveChanged' could try to access
the clientModel object, which might not exist because we manually delete
it inside 'BitcoinApplication::requestShutdown()'.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ad80922c8b..5f132b817e 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -989,6 +989,7 @@ void BitcoinGUI::gotoLoadPSBT(bool from_clipboard) void BitcoinGUI::updateNetworkState() { + if (!clientModel) return; int count = clientModel->getNumConnections(); QString icon; switch(count) |