diff --git a/opm/core/simulator/BlackoilState.hpp b/opm/core/simulator/BlackoilState.hpp index 153c2eed5..caf570e5c 100644 --- a/opm/core/simulator/BlackoilState.hpp +++ b/opm/core/simulator/BlackoilState.hpp @@ -22,6 +22,7 @@ #include #include +#include #include namespace Opm @@ -62,6 +63,7 @@ namespace Opm const int n = cells.size(); std::vector smin(num_phases_*n); std::vector smax(num_phases_*n); + ASSERT(n > 0); props.satRange(n, &cells[0], &smin[0], &smax[0]); const double* svals = (es == MinSat) ? &smin[0] : &smax[0]; for (int ci = 0; ci < n; ++ci) {