Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix out of bounds array access if nextVertex is called on empty QgsGe…
…ometryCollectionV2

(cherry-picked from 4c0e78a)
  • Loading branch information
manisandro authored and nyalldawson committed Mar 6, 2016
1 parent e2879c3 commit 1031172
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/geometry/qgsgeometrycollectionv2.cpp
Expand Up @@ -374,6 +374,10 @@ bool QgsGeometryCollectionV2::nextVertex( QgsVertexId& id, QgsPointV2& vertex )
id.ring = -1;
id.vertex = -1;
}
if ( mGeometries.isEmpty() )
{
return false;
}

QgsAbstractGeometryV2* geom = mGeometries.at( id.part );
if ( geom->nextVertex( id, vertex ) )
Expand Down

0 comments on commit 1031172

Please sign in to comment.