diff options
| author | Peter Penz <[email protected]> | 2008-07-19 15:56:52 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-07-19 15:56:52 +0000 |
| commit | ec2ed0f3e7b162ddf2ca264744af17a5d59c31f0 (patch) | |
| tree | b09209959ce7c83e23f6d10ccac481dd6bd73209 /src/statusbarspaceinfo.cpp | |
| parent | 8fc4bc196ac55f30e22113ab44b404e641679301 (diff) | |
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
Diffstat (limited to 'src/statusbarspaceinfo.cpp')
| -rw-r--r-- | src/statusbarspaceinfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index 059a55094..79a1169e5 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -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(); } |
