aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-04-17 19:03:45 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-04-20 15:17:17 -0400
commitfb463d1717669fe3f8d9b9142cc64a56fcd4200f (patch)
treef6a29c443d8b1cb0bc75951160a63f81b558e278 /src/qt
parent14c948987f0b5128af4dcf9864cf5fa62977c401 (diff)
downloadbitcoin-fb463d1717669fe3f8d9b9142cc64a56fcd4200f.tar.xz
[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.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/sendcoinsdialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 5d58a6a11f..098cda6d32 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -115,7 +115,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
- ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
}
@@ -176,6 +175,9 @@ void SendCoinsDialog::setModel(WalletModel *_model)
updateSmartFeeLabel();
updateGlobalFeeVariables();
+ // set default rbf checkbox state
+ ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
+
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
QSettings settings;
if (settings.value("nSmartFeeSliderPosition").toInt() == 0)