Page MenuHomePhabricator

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

Authored by jasonbcox on Apr 24 2019, 20:48.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr12074
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5595
Build 9252: Bitcoin ABC Buildbot (legacy)
Build 9251: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 25 2019, 06:30