Skip to content

Commit

Permalink
Ignore geometry-less features when calculating layer extent (Fix #8805)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 11, 2013
1 parent ee31dfe commit 5ef7f10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,8 +1145,11 @@ QgsRectangle QgsVectorLayer::extent()

for ( QgsFeatureMap::iterator it = mEditBuffer->mAddedFeatures.begin(); it != mEditBuffer->mAddedFeatures.end(); it++ )
{
QgsRectangle r = it->geometry()->boundingBox();
rect.combineExtentWith( &r );
if ( it->geometry() )
{
QgsRectangle r = it->geometry()->boundingBox();
rect.combineExtentWith( &r );
}
}
}
else
Expand Down

0 comments on commit 5ef7f10

Please sign in to comment.