Skip to content

Commit

Permalink
[memory provider] Don't crash on updateExtent and feature without geo…
Browse files Browse the repository at this point in the history
…metry
  • Loading branch information
m-kuhn committed Jun 23, 2013
1 parent ab54176 commit b53e80b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/providers/memory/qgsmemoryprovider.cpp
Expand Up @@ -422,9 +422,11 @@ void QgsMemoryProvider::updateExtent()
}
else
{
mExtent = mFeatures.begin().value().geometry()->boundingBox();
for ( QgsFeatureMap::iterator it = mFeatures.begin(); it != mFeatures.end(); ++it )
mExtent.unionRect( it.value().geometry()->boundingBox() );
Q_FOREACH( const QgsFeature& feat, mFeatures )
{
if ( feat.geometry() )
mExtent.unionRect( feat.geometry()->boundingBox() );
}
}
}

Expand Down

0 comments on commit b53e80b

Please sign in to comment.