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

This commit is contained in:
practicalswift 2017-10-02 17:20:08 +02:00
parent 4971a9a3c9
commit 76fed838f3

View file

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