mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user