mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 21:22:47 +01:00
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()'.
This commit is contained in:
@@ -989,6 +989,7 @@ void BitcoinGUI::gotoLoadPSBT(bool from_clipboard)
|
||||
|
||||
void BitcoinGUI::updateNetworkState()
|
||||
{
|
||||
if (!clientModel) return;
|
||||
int count = clientModel->getNumConnections();
|
||||
QString icon;
|
||||
switch(count)
|
||||
|
||||
Reference in New Issue
Block a user