mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Guard access to empty vector
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user