Skip to content

Commit

Permalink
Fix crash via division by zero assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed Oct 16, 2017
1 parent 2c66cea commit 207408b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/qt/coincontroldialog.cpp
Expand Up @@ -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.");

// how many satoshis the estimated fee can vary per byte we guess wrong
assert(nBytes != 0);
double dFeeVary = (double)nPayFee / nBytes;
double dFeeVary = (nBytes != 0) ? (double)nPayFee / nBytes : 0;

QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);

Expand Down

0 comments on commit 207408b

Please sign in to comment.