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 4cb37b1 commit 1690fc4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -1139,8 +1139,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 1690fc4

Please sign in to comment.