Browse Source

Avoid NULL pointer dereference when _walletModel is NULL (which is valid)

0.16
practicalswift 7 years ago
parent
commit
76fed838f3
  1. 4
      src/qt/walletview.cpp

4
src/qt/walletview.cpp

@ -122,8 +122,8 @@ void WalletView::setWalletModel(WalletModel *_walletModel)
overviewPage->setWalletModel(_walletModel); overviewPage->setWalletModel(_walletModel);
receiveCoinsPage->setModel(_walletModel); receiveCoinsPage->setModel(_walletModel);
sendCoinsPage->setModel(_walletModel); sendCoinsPage->setModel(_walletModel);
usedReceivingAddressesPage->setModel(_walletModel->getAddressTableModel()); usedReceivingAddressesPage->setModel(_walletModel ? _walletModel->getAddressTableModel() : nullptr);
usedSendingAddressesPage->setModel(_walletModel->getAddressTableModel()); usedSendingAddressesPage->setModel(_walletModel ? _walletModel->getAddressTableModel() : nullptr);
if (_walletModel) if (_walletModel)
{ {

Loading…
Cancel
Save