Skip to content

Commit fb463d1

Browse files
committed
[qt] Don't call method on null WalletModel object
This doesn't crash currently because the method doesn't access any object members, but this behavior is fragile and incompatible with #10102.
1 parent 14c9489 commit fb463d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
115115
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
116116
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
117117
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
118-
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
119118
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
120119
}
121120

@@ -176,6 +175,9 @@ void SendCoinsDialog::setModel(WalletModel *_model)
176175
updateSmartFeeLabel();
177176
updateGlobalFeeVariables();
178177

178+
// set default rbf checkbox state
179+
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
180+
179181
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
180182
QSettings settings;
181183
if (settings.value("nSmartFeeSliderPosition").toInt() == 0)

0 commit comments

Comments
 (0)