mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix WPrime CP lookup SEGV
.. when zones or cp not set for the date in question Fixes #774.
This commit is contained in:
@@ -535,8 +535,8 @@ class WPrimeExp : public RideMetric {
|
||||
const Context *) {
|
||||
|
||||
int cp = r->getTag("CP","0").toInt();
|
||||
if (!cp) cp = zones->getCP(zonerange);
|
||||
|
||||
if (!cp && zones && zonerange >=0) cp = zones->getCP(zonerange);
|
||||
|
||||
double total = 0;
|
||||
double secs = 0;
|
||||
foreach(const RideFilePoint *point, r->dataPoints()) {
|
||||
|
||||
Reference in New Issue
Block a user