We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent ab54176 commit b53e80bCopy full SHA for b53e80b
src/providers/memory/qgsmemoryprovider.cpp
@@ -422,9 +422,11 @@ void QgsMemoryProvider::updateExtent()
422
}
423
else
424
{
425
- mExtent = mFeatures.begin().value().geometry()->boundingBox();
426
- for ( QgsFeatureMap::iterator it = mFeatures.begin(); it != mFeatures.end(); ++it )
427
- mExtent.unionRect( it.value().geometry()->boundingBox() );
+ Q_FOREACH( const QgsFeature& feat, mFeatures )
+ {
+ if ( feat.geometry() )
428
+ mExtent.unionRect( feat.geometry()->boundingBox() );
429
+ }
430
431
432
0 commit comments