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:
Peter Penz 2008-07-19 15:56:52 +00:00
parent 8fc4bc196a
commit ec2ed0f3e7

View file

@ -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();
}