don't crash cpint plot when time < 0

This commit is contained in:
Sean Rhea
2009-09-20 14:13:48 -07:00
parent fcfae4d596
commit 8b4fbf0491

View File

@@ -131,7 +131,8 @@ update_cpi_file(const cpi_file_info *info, QProgressDialog *progress,
while (i.hasNext()) {
const RideFilePoint *p = i.next();
double secs = round(p->secs * 1000.0) / 1000;
data.points.append(cpint_point(secs, (int) round(p->watts)));
if (secs > 0)
data.points.append(cpint_point(secs, (int) round(p->watts)));
}
delete rideFile;