Skip to content

Commit

Permalink
Remove a potential source of crash in triangle interpolator
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10971 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 23, 2009
1 parent a4fbf95 commit c4162aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/interpolation/DualEdgeTriangulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,10 @@ bool DualEdgeTriangulation::getTriangle( double x, double y, Point3D* p1, Point3
int ptnr1 = mHalfEdge[edge1]->getPoint();
int ptnr2 = mHalfEdge[edge2]->getPoint();
int ptnr3 = mHalfEdge[edge3]->getPoint();
if(ptnr1 == -1 || ptnr2 == -1 || ptnr3 == -1)
{
return false;
}
p1->setX( mPointVector[ptnr1]->getX() );
p1->setY( mPointVector[ptnr1]->getY() );
p1->setZ( mPointVector[ptnr1]->getZ() );
Expand Down

0 comments on commit c4162aa

Please sign in to comment.