Skip to content
Permalink
Browse files

Fix crash when clearing all nodes using node tool

  • Loading branch information
nyalldawson committed Nov 13, 2017
1 parent 66c7d68 commit 6f7ad82a72dc3409b0475b4c2c1f9d21cf895def
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/app/nodetool/qgsnodetool.cpp
@@ -126,11 +126,8 @@ static QgsGeometry geometryToMultiPoint( const QgsGeometry &geom )
{
QgsMultiPoint *multiPoint = new QgsMultiPoint();
QgsGeometry outputGeom( multiPoint );
const QgsAbstractGeometry *g = geom.constGet();
for ( int i = 0; i < g->partCount(); ++i )
for ( int j = 0; j < g->ringCount( i ); ++j )
for ( int k = 0; k < g->vertexCount( i, j ); ++k )
multiPoint->addGeometry( new QgsPoint( g->vertexAt( QgsVertexId( i, j, k ) ) ) );
for ( auto pointIt = geom.vertices_begin(); pointIt != geom.vertices_end(); ++pointIt )
multiPoint->addGeometry( ( *pointIt ).clone() );
return outputGeom;
}

0 comments on commit 6f7ad82

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