Skip to content

Commit

Permalink
Fix NP exception when editing empty step counter
Browse files Browse the repository at this point in the history
Resolves #167
  • Loading branch information
morckx committed Sep 15, 2024
1 parent 97b586e commit b183d8e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ private void generateReports(boolean updated) {
distance += s1.getDistance();
calories += s1.getCalories(context);
if (!stepData.containsKey(formatHourMinute.format(s1.getEndTime())) ||
stepData.get(formatHourMinute.format(s1.getEndTime())).getStepCount().getStepCount() < stepCount) {
(stepData.get(formatHourMinute.format(s1.getEndTime())) != null && stepData.get(formatHourMinute.format(s1.getEndTime())).getStepCount().getStepCount() < stepCount)) {
if (s1.getEndTime() > Calendar.getInstance().getTime().getTime()) {
stepData.put(formatHourMinute.format(s1.getEndTime()), null);
distanceData.put(formatHourMinute.format(s1.getEndTime()), null);
Expand Down

0 comments on commit b183d8e

Please sign in to comment.