From 6a7661f5161f4b158249e6d5aa47e72d1effcdb6 Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Sun, 30 Jun 2019 08:57:16 -0700 Subject: [PATCH] Fix crash in CPAP rebuild byt ignoring Day entry with first = 0. --- oscar/statistics.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oscar/statistics.cpp b/oscar/statistics.cpp index 8a475d77..e38a3b3f 100644 --- a/oscar/statistics.cpp +++ b/oscar/statistics.cpp @@ -182,6 +182,11 @@ void Statistics::updateRXChanges() if (mach == nullptr) continue; + if (day->first() == 0) { // Ignore invalid dates + qDebug() << "Statistics::updateRXChanges ignoring day with first=0"; + continue; + } + bool fnd = false;