mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Fix crash in AllPlot on Manual Ride
When a manual ride is selected whilst on allplot it will refresh the plots, but computes invalid offsets into the ride data. this patch fixes this crash. Fixes #128.
This commit is contained in:
@@ -608,6 +608,9 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx)
|
||||
stopidx = plot->timeIndex(plot->timeArray[(stopidx>=plot->timeArray.size()?plot->timeArray.size()-1:stopidx)]/60)-1;
|
||||
}
|
||||
|
||||
// make sure indexes are still valid
|
||||
if (startidx > stopidx || startidx < 0 || stopidx < 0) return;
|
||||
|
||||
double *smoothW = &plot->smoothWatts[startidx];
|
||||
double *smoothT = &plot->smoothTime[startidx];
|
||||
double *smoothHR = &plot->smoothHr[startidx];
|
||||
|
||||
Reference in New Issue
Block a user