Fix SEGV in AllPlot when smooth adjust

But only affected if temperature is available.
This commit is contained in:
Mark Liversedge
2012-01-30 17:10:12 +00:00
parent 575d56e2e8
commit ec8faeaf7b

View File

@@ -522,7 +522,8 @@ AllPlot::recalc()
totalAlt += altArray[i];
if (!tempArray.empty() ) {
if (tempArray[i] == RideFile::noTemp && i>0) {
dp.temp = (i>0?list.back().temp:0.0);
if (list.count() && i>0) dp.temp = list.back().temp;
else dp.temp = 0.0f;
totalTemp += dp.temp;
}
else {