diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index 70728740..6ce7f96b 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -290,11 +290,10 @@ namespace Opm if (deck->hasKeyword("DISGAS")) { const TableContainer& rsvdTables = tables->getRsvdTables(); for (size_t i = 0; i < rec.size(); ++i) { - const RsvdTable& rsvdTable = rsvdTables.getTable(i); const int cell = *(eqlmap.cells(i).begin()); if (rec[i].live_oil_table_index > 0) { if (rsvdTables.size() > 0 && size_t(rec[i].live_oil_table_index) <= rsvdTables.size()) { - + const RsvdTable& rsvdTable = rsvdTables.getTable(i); rs_func_.push_back(std::make_shared(props, cell, rsvdTable.getDepthColumn(),