Correct crash for Joule 2.0 files without temperature for first seconds

This commit is contained in:
Damien
2012-11-27 22:06:27 +01:00
parent 1eba467976
commit df884d77f0

View File

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