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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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