Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove a potential source of crash in triangle interpolator
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10971 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 23, 2009
1 parent c28f61b commit d953fcd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/interpolation/DualEdgeTriangulation.cc
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 d953fcd

Please sign in to comment.