Fix crash due to wrong closest index comparison in RigSimulationWellCoordsAndMD

This commit is contained in:
Gaute Lindkvist committed 2018-05-09 10:44:29 +02:00
1 parent f24fb4aaec
commit 47ed8dac74
1 file changed
+1 -1
@@ -92,7 +92,7 @@ double RigSimulationWellCoordsAndMD::locationAlongWellCoords(const cvf::Vec3d& p
size_t closestIndex = findClosestIndex(position); size_t closestIndex = findClosestIndex(position);
if (closestIndex != cvf::UNDEFINED_DOUBLE) if (closestIndex != cvf::UNDEFINED_SIZE_T)
{ {
cvf::Vec3d p1 = m_wellPathPoints[closestIndex - 1]; cvf::Vec3d p1 = m_wellPathPoints[closestIndex - 1];
cvf::Vec3d p2 = m_wellPathPoints[closestIndex - 0]; cvf::Vec3d p2 = m_wellPathPoints[closestIndex - 0];