Skip to content

Commit

Permalink
Fix out of bounds array access if nextVertex is called on empty QgsGe…
Browse files Browse the repository at this point in the history
…ometryCollectionV2
  • Loading branch information
manisandro committed Mar 5, 2016
1 parent 2eb8243 commit 4c0e78a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/geometry/qgsgeometrycollectionv2.cpp
Original file line number Diff line number Diff line change
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 4c0e78a

Please sign in to comment.