mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
fix possible division by 0 crash (no backport to 4.1 needed, as there QProgressBar is used instead of KCapacityBar)
svn path=/trunk/KDE/kdebase/apps/; revision=834788
This commit is contained in:
parent
8fc4bc196a
commit
ec2ed0f3e7
|
@ -68,7 +68,7 @@ void StatusBarSpaceInfo::slotFoundMountPoint(const QString& mountPoint,
|
|||
setText(i18nc("@info:status Free disk space", "%1 free", KIO::convertSize(kBAvailable * 1024)));
|
||||
setUpdatesEnabled(false);
|
||||
m_kBSize = kBSize;
|
||||
setValue((kBUsed * 100) / kBSize);
|
||||
setValue(kBSize > 0 ? (kBUsed * 100) / kBSize : 0);
|
||||
setUpdatesEnabled(true);
|
||||
update();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue