mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: guard against invalid dereference in getRho
This commit is contained in:
parent
e8152a1b65
commit
a4df84f785
@ -106,7 +106,10 @@ protected:
|
||||
mutable BVectorWell Bx_;
|
||||
mutable BVectorWell invDrw_;
|
||||
|
||||
double getRho() const { return perf_densities_[0]; }
|
||||
double getRho() const
|
||||
{
|
||||
return this->perf_densities_.empty() ? 0.0 : perf_densities_[0];
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user