mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-25 09:13:16 -05:00
Fix occasional divide by zero crash
This commit is contained in:
parent
3b1e15ea1a
commit
8db604e787
1 changed files with 5 additions and 1 deletions
|
|
@ -51,7 +51,11 @@ UrlFetchProgressDialog::UrlFetchProgressDialog(const QUrl &url, QWidget *parent)
|
||||||
|
|
||||||
void UrlFetchProgressDialog::networkReplyProgress(qint64 bytesRead, qint64 totalBytes)
|
void UrlFetchProgressDialog::networkReplyProgress(qint64 bytesRead, qint64 totalBytes)
|
||||||
{
|
{
|
||||||
setValue(static_cast<int>(bytesRead / totalBytes));
|
if (totalBytes > 0) {
|
||||||
|
setValue(static_cast<int>(bytesRead / totalBytes));
|
||||||
|
} else {
|
||||||
|
setValue(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditWidgetIcons::EditWidgetIcons(QWidget* parent)
|
EditWidgetIcons::EditWidgetIcons(QWidget* parent)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue