Skip to content
Permalink
Browse files

Fix interpolation tool crashes qgis #12855

  • Loading branch information
elpaso authored and m-kuhn committed Jun 5, 2015
1 parent 1d073da commit 94873eb08cb56580a2d49b5d6a0fb744e4002f06
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/analysis/interpolation/DualEdgeTriangulation.cc
@@ -77,7 +77,9 @@ void DualEdgeTriangulation::addLine( Line3D* line, bool breakline )
for ( i = 0; i < line->getSize(); i++ )
{
line->goToNext();
actpoint = mDecorator->addPoint( line->getPoint() );
// Use copy ctor since line can be deleted as well as its
// associated Node and Point3D
actpoint = mDecorator->addPoint( new Point3D( *line->getPoint() ) );
if ( actpoint != -100 )
{
i++;
@@ -94,7 +96,7 @@ void DualEdgeTriangulation::addLine( Line3D* line, bool breakline )
for ( ; i < line->getSize(); i++ )
{
line->goToNext();
currentpoint = mDecorator->addPoint( line->getPoint() );
currentpoint = mDecorator->addPoint( new Point3D( *line->getPoint() ) );
if ( currentpoint != -100 && actpoint != -100 && currentpoint != actpoint )//-100 is the return value if the point could not be not inserted
{
insertForcedSegment( actpoint, currentpoint, breakline );

0 comments on commit 94873eb

Please sign in to comment.
You can’t perform that action at this time.