mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Janitor : Guard access to empty vector
This commit is contained in:
1 parent
d1d072140e
commit
da30992d5a
1 file changed
+5
-2
+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 );
|
||||
|
||||
Reference in new issue
Block a user