Skip to content
Permalink
Browse files

[memory provider] Don't crash on updateExtent and feature without geo…

…metry
  • Loading branch information
m-kuhn committed Jun 23, 2013
1 parent ab54176 commit b53e80b84a80a99148cc05585d57b69d50ea9599
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/providers/memory/qgsmemoryprovider.cpp
@@ -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() );
}
}
}

0 comments on commit b53e80b

Please sign in to comment.
You can’t perform that action at this time.