mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
[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.
This commit is contained in:
parent
14c948987f
commit
fb463d1717
@ -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->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
|
||||||
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
|
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
|
||||||
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
|
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
|
||||||
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
|
|
||||||
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,6 +175,9 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
|||||||
updateSmartFeeLabel();
|
updateSmartFeeLabel();
|
||||||
updateGlobalFeeVariables();
|
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)
|
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
if (settings.value("nSmartFeeSliderPosition").toInt() == 0)
|
if (settings.value("nSmartFeeSliderPosition").toInt() == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user