From 39ef9efc4dc02401694395cf3b44f7293a0c45d0 Mon Sep 17 00:00:00 2001 From: Sean Rhea Date: Fri, 27 Nov 2009 22:55:30 -0500 Subject: [PATCH] bug fix: don't compute Daniels Points if no CP set --- src/DanielsPoints.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DanielsPoints.cpp b/src/DanielsPoints.cpp index 4f1b3b981..ac32dd8d8 100644 --- a/src/DanielsPoints.cpp +++ b/src/DanielsPoints.cpp @@ -45,6 +45,8 @@ class DanielsPoints : public RideMetric { double value(bool) const { return score; } void compute(const RideFile *ride, const Zones *zones, int zoneRange, const QHash &) { + if (!zones) + return; static const double EPSILON = 0.1; static const double NEGLIGIBLE = 0.1;