#2367 Fix crash in completion type calculation for wellpaths without geometry

This commit is contained in:
Jacob Støren
2018-01-12 11:36:12 +01:00
parent 472aa87265
commit 67bc555d49

View File

@@ -92,9 +92,13 @@ void RimCompletionCellIntersectionCalc::calculateWellPathIntersections(const Rim
std::vector<double>& values,
const QDateTime& fromDate)
{
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(grid,
wellPath->wellPathGeometry()->m_wellPathPoints);
std::vector<HexIntersectionInfo> intersections;
if (wellPath->wellPathGeometry())
{
intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(grid,
wellPath->wellPathGeometry()->m_wellPathPoints);
}
for (auto& intersection : intersections)
{
values[intersection.m_hexIndex] = RiaDefines::WELL_PATH;