mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-11 17:19:40 -04: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)
|
||||
{
|
||||
if (totalBytes > 0) {
|
||||
setValue(static_cast<int>(bytesRead / totalBytes));
|
||||
} else {
|
||||
setValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
EditWidgetIcons::EditWidgetIcons(QWidget* parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue