diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-10-15 22:42:01 -0700 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-10-15 22:44:01 -0700 |
commit | 207408b0889caf3f5986bde4b122dbece1ed0dac (patch) | |
tree | 790657cc6b502699d0d1c407d6fe2c4fc86f020f /src/qt/coincontroldialog.cpp | |
parent | 2c66cea2d18682de1eef544fc3b74a1487a1741c (diff) |
Fix crash via division by zero assertion
Diffstat (limited to 'src/qt/coincontroldialog.cpp')
-rw-r--r-- | src/qt/coincontroldialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 6952eb5064..207e441b6b 100644 --- a/src/qt/coincontroldialog.cpp +++ b/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."); // 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); |