diff --git a/src/gui/EditWidgetIcons.cpp b/src/gui/EditWidgetIcons.cpp index b13c8ba37..8242c4399 100644 --- a/src/gui/EditWidgetIcons.cpp +++ b/src/gui/EditWidgetIcons.cpp @@ -51,7 +51,11 @@ UrlFetchProgressDialog::UrlFetchProgressDialog(const QUrl &url, QWidget *parent) void UrlFetchProgressDialog::networkReplyProgress(qint64 bytesRead, qint64 totalBytes) { - setValue(static_cast(bytesRead / totalBytes)); + if (totalBytes > 0) { + setValue(static_cast(bytesRead / totalBytes)); + } else { + setValue(0); + } } EditWidgetIcons::EditWidgetIcons(QWidget* parent)