diff --git a/src/apps/powerstatus/PowerStatusView.cpp b/src/apps/powerstatus/PowerStatusView.cpp index 79031329a5..534db9e890 100644 --- a/src/apps/powerstatus/PowerStatusView.cpp +++ b/src/apps/powerstatus/PowerStatusView.cpp @@ -332,7 +332,9 @@ PowerStatusView::Update(bool force) _GetBatteryInfo(&fBatteryInfo, fBatteryID); - fPercent = (100 * fBatteryInfo.capacity) / fBatteryInfo.full_capacity; + if (fBatteryInfo.full_capacity != 0) + fPercent = (100 * fBatteryInfo.capacity) / fBatteryInfo.full_capacity; + fTimeLeft = fBatteryInfo.time_left; if ((fBatteryInfo.state & BATTERY_CHARGING) != 0) fOnline = true;