Merge pull request #2959 from blattms/fix-initCompletions

[bugfix] Do not iterate pass end of perf_data_ in initCompletions
This commit is contained in:
Atgeirr Flø Rasmussen 2020-12-02 16:11:05 +01:00 committed by GitHub
commit 30856af1ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,10 @@ namespace Opm
int num_active_connections = 0;
auto my_next_perf = perf_data_->begin();
for (std::size_t c = 0; c < num_conns; ++c) {
if (my_next_perf == perf_data_->end())
{
break;
}
if (my_next_perf->ecl_index > c)
{
continue;