1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-09 03:37:03 +01:00

Garmin: Avoid NPE if parts of HRV data are missing

This commit is contained in:
José Rebelo 2024-08-18 23:42:36 +01:00
parent 1d496b5ce5
commit 7514b50d19

View File

@ -223,12 +223,13 @@ public class HRVStatusFragment extends AbstractChartFragment<HRVStatusFragment.H
finalDay, finalDay,
finalCounter, finalCounter,
sample.getTimestamp(), sample.getTimestamp(),
avgHRV, sample.getWeeklyAverage(), avgHRV,
sample.getLastNightAverage(), sample.getWeeklyAverage() != null ? sample.getWeeklyAverage() : 0,
sample.getLastNight5MinHigh(), sample.getLastNightAverage() != null ? sample.getLastNightAverage() : 0,
sample.getBaselineBalancedLower(), sample.getLastNight5MinHigh() != null ? sample.getLastNight5MinHigh() : 0,
sample.getBaselineBalancedUpper(), sample.getBaselineBalancedLower() != null ? sample.getBaselineBalancedLower() : 0,
sample.getStatus() sample.getBaselineBalancedUpper() != null ? sample.getBaselineBalancedUpper() : 0,
sample.getStatus() != null ? sample.getStatus() : HrvSummarySample.Status.NONE
)); ));
}); });
} else { } else {