diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-09-15 09:55:14 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-09-15 09:55:23 +0200 |
| commit | 09627b1dd41d1151a709d5ead82a924bf59e3d38 (patch) | |
| tree | 7d797caf8a314f716a3935cb3f4f67e223ca63c2 /src | |
| parent | Merge #11330: Trivial: Fix comments for DEFAULT_WHITELIST[FORCE]RELAY (diff) | |
| parent | Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selected (diff) | |
| download | discoin-09627b1dd41d1151a709d5ead82a924bf59e3d38.tar.xz discoin-09627b1dd41d1151a709d5ead82a924bf59e3d38.zip | |
Merge #11332: Fix possible crash with invalid nCustomFeeRadio in QSettings (achow101, TheBlueMatt)
cdaf3a1 Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selected (Matt Corallo)
Pull request description:
`QButtonGroup->button()` may return a nullptr.
Accessing the object directly with `setChecked` seems fragile.
This is a simple fix to ensure to never call a button out of bounds (nullptr).
There are probably other places where a sanity check for `QSettings` are required.
Found by @achow101.
Code by @TheBlueMatt.
Tree-SHA512: a1b5d6636382a4e20c4e66ef82de19e6daa8b1b5f21b0f2bc5f51cfb6b37797045c7e29ebead8088ee2b990ed12c549c217cae6aad7566319599d086d526f6dc
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/sendcoinsdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 05c5ccbfe..cc7786a07 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -128,7 +128,7 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p ui->groupFee->setId(ui->radioCustomFee, 1); ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true); ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0); - ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true); + ui->groupCustomFee->button(0)->setChecked(true); ui->customFee->setValue(settings.value("nTransactionFee").toLongLong()); ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool()); minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool()); |