Skip to content

Commit 207408b

Browse files
committed
Fix crash via division by zero assertion
1 parent 2c66cea commit 207408b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/qt/coincontroldialog.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
582582
QString toolTipDust = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");
583583

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

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

0 commit comments

Comments
 (0)