#7852 Crash on dual porosity grid model load and clicking on cell in 3D view

This commit is contained in:
Magne Sjaastad 2021-08-03 14:34:51 +02:00
parent 40fc7dacd0
commit 5cd72f55f3

View File

@ -1233,7 +1233,9 @@ deriveNeighbours(const std::vector<std::size_t>& gcells,
continue; continue;
} }
if (T[globID] > 0.0) { // Guard access to transmissibility vector. Crash seen in some dual porosity models
// https://github.com/OPM/ResInsight/issues/7852
if (globID < T.size() && T[globID] > 0.0) {
const auto other = this->cells_.getNeighbour(globID, d); const auto other = this->cells_.getNeighbour(globID, d);
if ((other >= 0) && ! this->cells_.isSubdivided(other)) { if ((other >= 0) && ! this->cells_.isSubdivided(other)) {