From 8b4fbf04917035e512b63e4b63019716fc374375 Mon Sep 17 00:00:00 2001 From: Sean Rhea Date: Sun, 20 Sep 2009 14:13:48 -0700 Subject: [PATCH] don't crash cpint plot when time < 0 --- src/CpintPlot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CpintPlot.cpp b/src/CpintPlot.cpp index 0133245cf..53ca533e3 100644 --- a/src/CpintPlot.cpp +++ b/src/CpintPlot.cpp @@ -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;