Skip to content
Permalink
Browse files

Fix #9532 (node tool crash on a layer with a feature without geometry)

  • Loading branch information
wonder-sk committed Apr 15, 2014
1 parent 5cd1a83 commit d7379ca1abc723d5e643e8bb385abfed3529b74b
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/providers/ogr/qgsogrfeatureiterator.cpp
@@ -291,6 +291,9 @@ bool QgsOgrFeatureIterator::readFeature( OGRFeatureH fet, QgsFeature& feature )
QgsGeometry* geometry = feature.geometry();
if ( !geometry ) feature.setGeometryAndOwnership( wkb, memorySize ); else geometry->fromWkb( wkb, memorySize );
}
else
feature.setGeometry( 0 );

if (( useIntersect && ( !feature.geometry() || !feature.geometry()->intersects( mRequest.filterRect() ) ) )
|| ( geometryTypeFilter && ( !feature.geometry() || QgsOgrProvider::ogrWkbSingleFlatten(( OGRwkbGeometryType )feature.geometry()->wkbType() ) != mSource->mOgrGeometryTypeFilter ) ) )
{

0 comments on commit d7379ca

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