Skip to content
Permalink
Browse files

Fix crash when removing vertices from compound curves

  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent 27b4306 commit 6c2c0af19d3f93ce129b298c99a6c98393b3ee09
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/geometry/qgscompoundcurve.cpp
@@ -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 )

0 comments on commit 6c2c0af

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