From 6c2c0af19d3f93ce129b298c99a6c98393b3ee09 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 25 Sep 2017 12:40:01 +1000 Subject: [PATCH] Fix crash when removing vertices from compound curves --- src/core/geometry/qgscompoundcurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/geometry/qgscompoundcurve.cpp b/src/core/geometry/qgscompoundcurve.cpp index 5bdd17190c1..23c2bdac6e0 100644 --- a/src/core/geometry/qgscompoundcurve.cpp +++ b/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 )