aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.cpp
diff options
context:
space:
mode:
author251 <[email protected]>2018-01-02 01:06:23 +0100
committer251 <[email protected]>2018-01-02 01:06:23 +0100
commit6dda059bde0798f54626108beab29d9d3834769c (patch)
tree05892e56aef46f9cd812086527e3d6133de4bdc1 /src/qt/transactionview.cpp
parentMerge #12027: [Docs] Remove boost --c++ flag from osx build instructions (diff)
downloaddiscoin-6dda059bde0798f54626108beab29d9d3834769c.tar.xz
discoin-6dda059bde0798f54626108beab29d9d3834769c.zip
[qt] Simplifies boolean expression model && model->haveWatchOnly()
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.
Diffstat (limited to 'src/qt/transactionview.cpp')
-rw-r--r--src/qt/transactionview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index b7e39e05e..ab5b38195 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -365,7 +365,7 @@ void TransactionView::exportClicked()
// name, column, role
writer.setModel(transactionProxyModel);
writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
- if (model && model->haveWatchOnly())
+ if (model->haveWatchOnly())
writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);