Avoid NULL pointer dereference when _walletModel is NULL (which is valid)
Summary:
Partial backport of Core PR10898 (commit 76fed83)
https://github.com/bitcoin/bitcoin/pull/10898/commits/76fed838f381a6efba175f3650ec7e9dc73016d3
Test Plan:
ninja check
bitcoin-qt
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2625