mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Fix crash on 'dodgy' .man file in v3
This is a fix for bug 205 which is registered against v2.1 but is also present in v3. This fix will not be relevant for v2.1 since the cpi file has been replaced with the cpx file.
This commit is contained in:
@@ -558,6 +558,10 @@ MeanMaxComputer::run()
|
||||
double secs = round(p->secs * 1000.0) / 1000;
|
||||
if (secs > 0) data.points.append(cpintpoint(secs, (int) round(p->value(baseSeries))));
|
||||
}
|
||||
|
||||
// don't bother with insufficient data
|
||||
if (!data.points.count()) return;
|
||||
|
||||
int total_secs = (int) ceil(data.points.back().secs);
|
||||
|
||||
// don't allow data more than two days
|
||||
|
||||
Reference in New Issue
Block a user