Bugfix: selected interval may be null.

This commit is contained in:
Dennis Guse
2021-12-27 08:12:52 +01:00
parent 77f56a5376
commit 9af213fd12
@@ -182,7 +182,9 @@ public class IntervalsFragment extends Fragment {
}
private synchronized void updateIntervals(boolean metricUnits, IntervalStatisticsModel.IntervalOption selectedInterval) {
boolean update = metricUnits != this.metricUnits || !selectedInterval.sameMultiplier(this.selectedInterval);
boolean update = metricUnits != this.metricUnits
|| selectedInterval == null
|| !selectedInterval.sameMultiplier(this.selectedInterval);
this.metricUnits = metricUnits;
this.selectedInterval = selectedInterval;