diff --git a/applications/ebos/eclthresholdpressure.hh b/applications/ebos/eclthresholdpressure.hh index 7cbf1d7f6..df370ceb3 100644 --- a/applications/ebos/eclthresholdpressure.hh +++ b/applications/ebos/eclthresholdpressure.hh @@ -222,8 +222,8 @@ private: const auto& gridView = gridManager.gridView(); const auto& elementMapper = simulator_.model().elementMapper(); const auto& eclState = simulator_.gridManager().eclState(); - Opm::SimulationConfigConstPtr simConfig = eclState->getSimulationConfig(); - Opm::ThresholdPressureConstPtr thpres = simConfig->getThresholdPressure(); + const Opm::SimulationConfig& simConfig = eclState->getSimulationConfig(); + Opm::ThresholdPressureConstPtr thpres = simConfig.getThresholdPressure(); // set the threshold pressures for all EQUIL region boundaries which have a // intersection in the grid