Skip to content

Commit

Permalink
Fix crash when removing vertices from compound curves
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent 27b4306 commit 6c2c0af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/geometry/qgscompoundcurve.cpp
Expand Up @@ -606,15 +606,15 @@ bool QgsCompoundCurve::deleteVertex( QgsVertexId position )
if ( mCurves.at( curveIds.at( 0 ).first )->numPoints() == 0 &&
mCurves.at( curveIds.at( 1 ).first )->numPoints() != 0 )
{
removeCurve( curveIds.at( 0 ).first );
mCurves.at( curveIds.at( 1 ).first )->moveVertex( QgsVertexId( 0, 0, 0 ), startPoint );
removeCurve( curveIds.at( 0 ).first );
}
else if ( mCurves.at( curveIds.at( 0 ).first )->numPoints() != 0 &&
mCurves.at( curveIds.at( 1 ).first )->numPoints() == 0 )
{
removeCurve( curveIds.at( 1 ).first );
mCurves.at( curveIds.at( 0 ).first )->moveVertex(
QgsVertexId( 0, 0, mCurves.at( curveIds.at( 0 ).first )->numPoints() - 1 ), endPoint );
removeCurve( curveIds.at( 1 ).first );
}
else if ( mCurves.at( curveIds.at( 0 ).first )->numPoints() == 0 &&
mCurves.at( curveIds.at( 1 ).first )->numPoints() == 0 )
Expand Down

0 comments on commit 6c2c0af

Please sign in to comment.