diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index 7c636d5b2..ee144dfc1 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -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 {