diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-10-02 17:20:08 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-10-02 17:20:08 +0200 |
commit | 76fed838f381a6efba175f3650ec7e9dc73016d3 (patch) | |
tree | c02c676b6224e226e47ab044f4f4c45cc2d7e812 /src | |
parent | 4971a9a3c928235ef4af29a7f72379cbb567e446 (diff) |
Avoid NULL pointer dereference when _walletModel is NULL (which is valid)
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/walletview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 971f5e0e1a..a56a40037f 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -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) { |