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:
furszy
2024-02-28 09:47:20 -03:00
parent ba907f96ad
commit f3a612f901
5 changed files with 15 additions and 1 deletions

View File

@@ -58,6 +58,8 @@ public:
explicit ClientModel(interfaces::Node& node, OptionsModel *optionsModel, QObject *parent = nullptr);
~ClientModel();
void stop();
interfaces::Node& node() const { return m_node; }
OptionsModel *getOptionsModel();
PeerTableModel *getPeerTableModel();