fixed: guard against invalid dereference in getRho

This commit is contained in:
Arne Morten Kvarving 2022-10-20 11:26:46 +02:00
parent e8152a1b65
commit a4df84f785

View File

@ -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];
}
};
}