Janitor : Guard access to empty vector

This commit is contained in:
Magne Sjaastad committed 2021-10-20 14:44:25 +02:00
1 parent d1d072140e
commit da30992d5a
1 file changed
+5 -2
@@ -295,8 +295,11 @@ std::tuple<std::vector<double>, std::vector<double>, std::vector<double>>
}
else
{
// The last point is added without interpolation
value = sourceValues.back();
if ( !sourceValues.empty() )
{
// The last point is added without interpolation
value = sourceValues.back();
}
}
interpolatedValues.push_back( value );