mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix 'Fix Elevation' SEGV
.. there may be more bugs lurking in there but this resolves a SEGV that seems quite common.
This commit is contained in:
@@ -176,7 +176,7 @@ FixElevation::postProcess(RideFile *ride, DataProcessorConfig *)
|
||||
int loopCount = 0;
|
||||
|
||||
for( std::vector<elevationGPSPoint>::iterator point = elvPoints.begin() ; point != elvPoints.end() ; ++point ) {
|
||||
double elev = smoothArray[loopCount];
|
||||
double elev = smoothArray.size() > loopCount ? smoothArray[loopCount] : -100;
|
||||
// ignore any seriously negative points
|
||||
if (elev>-100) ride->command->setPointValue(point->rideFileIndex, RideFile::alt, elev);
|
||||
++loopCount;
|
||||
|
||||
Reference in New Issue
Block a user