HomePhabricator

[qt] Simplifies boolean expression model && model->haveWatchOnly()

Description

[qt] Simplifies boolean expression model && model->haveWatchOnly()

Summary:
The boolean expression model && model->haveWatchOnly() can be simplified to model->haveWatchOnly(), because if (!model || !model->getOptionsModel()) { return; } guards against a potential dereferenced null pointer.

Backport of Core PR 12074
https://github.com/bitcoin/bitcoin/pull/12074/files
Depends on D2875

Test Plan:
make check
bitcoin-qt # sanity checks on export txs

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D2876

Details

Provenance
251 <13120787+251Labs@users.noreply.github.com>Authored on Jan 2 2018, 00:06
jasonbcoxCommitted on Apr 25 2019, 15:38
jasonbcoxPushed on Apr 25 2019, 15:38
Reviewer
Restricted Project
Differential Revision
D2876: [qt] Simplifies boolean expression model && model->haveWatchOnly()
Parents
rABC370d6146a348: [qt] Avoid potential null pointer dereference in TransactionView::exportClicked…
Branches
Unknown
Tags
Unknown