Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash when clearing all nodes using node tool
  • Loading branch information
nyalldawson committed Nov 13, 2017
1 parent 66c7d68 commit 6f7ad82
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/nodetool/qgsnodetool.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6f7ad82

Please sign in to comment.