fix maps crash when no CP is set

The check in the maps code for whether a CP is set was backwards, causing
a segfault on the subsequent call to Zones::getCP().  To reproduce, create
a new cyclist and import a ride with lat/lng data.  The import succeeds, but
GC crashes when you click "Save" and on all subsequent restarts.
This commit is contained in:
Sean Rhea
2010-03-07 08:24:20 -05:00
parent a02bfaf810
commit 0fd735e16d

View File

@@ -255,7 +255,7 @@ string GoogleMapControl::CreatePolyLine(RideItem *ride)
int cp;
int intervalTime = 30; // 30 seconds
int zone =ride->zoneRange();
if(zone >= 0)
if(zone < 0)
{
cp = 300; // default cp to 300 watts
}