Browse Source

Fix crash via division by zero assertion

0.16
Jonas Schnelli 7 years ago
parent
commit
207408b088
No known key found for this signature in database
GPG Key ID: 1EB776BB03C7922D
  1. 3
      src/qt/coincontroldialog.cpp

3
src/qt/coincontroldialog.cpp

@ -582,8 +582,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
QString toolTipDust = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold."); QString toolTipDust = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");
// how many satoshis the estimated fee can vary per byte we guess wrong // how many satoshis the estimated fee can vary per byte we guess wrong
assert(nBytes != 0); double dFeeVary = (nBytes != 0) ? (double)nPayFee / nBytes : 0;
double dFeeVary = (double)nPayFee / nBytes;
QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary); QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);

Loading…
Cancel
Save