statistics: don't display invalid data when first > last.

This commit is contained in:
LoudSnorer 2023-06-13 09:51:43 -04:00
parent eb8b3f19ea
commit 6f2100d3cb

View File

@ -1331,6 +1331,9 @@ QString Statistics::GenerateCPAPUsage()
} else { // STAT_MODE_RANGE
first = p_profile->general->statReportRangeStart();
last = p_profile->general->statReportRangeEnd();
if (first > last) {
first=last;
}
periods.push_back(Period(first,last,first.toString(MedDateFormat)+" - "+last.toString(MedDateFormat)));
}