mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix occasional divide by zero crash
This commit is contained in:
parent
3b1e15ea1a
commit
8db604e787
@ -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)
|
||||||
{
|
{
|
||||||
|
if (totalBytes > 0) {
|
||||||
setValue(static_cast<int>(bytesRead / totalBytes));
|
setValue(static_cast<int>(bytesRead / totalBytes));
|
||||||
|
} else {
|
||||||
|
setValue(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditWidgetIcons::EditWidgetIcons(QWidget* parent)
|
EditWidgetIcons::EditWidgetIcons(QWidget* parent)
|
||||||
|
Loading…
Reference in New Issue
Block a user