diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qprogressdialog.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp index 43bce7d..9bab29a 100644 --- a/src/gui/dialogs/qprogressdialog.cpp +++ b/src/gui/dialogs/qprogressdialog.cpp @@ -693,6 +693,7 @@ void QProgressDialog::setValue(int progress) int estimate; int totalSteps = maximum() - minimum(); int myprogress = progress - minimum(); + if (myprogress == 0) myprogress = 1; if ((totalSteps - myprogress) >= INT_MAX / elapsed) estimate = (totalSteps - myprogress) / myprogress * elapsed; else |