From ec8faeaf7bae12ca809a2884ea31a7a40d8a655e Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Mon, 30 Jan 2012 17:10:12 +0000 Subject: [PATCH] Fix SEGV in AllPlot when smooth adjust But only affected if temperature is available. --- src/AllPlot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {