HomePhabricator

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

Authored by 251 <13120787+251Labs@users.noreply.github.com> on Jan 2 2018, 00:06.

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

Committed
jasonbcoxApr 25 2019, 15:38
Pushed
jasonbcoxApr 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

Event Timeline

jasonbcox committed rABCaeb3ff3467ce: [qt] Simplifies boolean expression model && model->haveWatchOnly() (authored by 251 <13120787+251Labs@users.noreply.github.com>).Apr 25 2019, 15:38