Skip to content

Commit 6dda059

Browse files
committed
[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.
1 parent 63a4dc1 commit 6dda059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/transactionview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ void TransactionView::exportClicked()
365365
// name, column, role
366366
writer.setModel(transactionProxyModel);
367367
writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
368-
if (model && model->haveWatchOnly())
368+
if (model->haveWatchOnly())
369369
writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
370370
writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
371371
writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);

0 commit comments

Comments
 (0)