]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarspaceinfo.cpp
fix crash when opening a lot of columns and going back very fast by clicking on each...
[dolphin.git] / src / statusbarspaceinfo.cpp
index 059a55094e6f1074a641e2bdb81c10dc621cc388..79a1169e58dc610c6fb08ce77120e384165751a9 100644 (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();
     }