Skip to content
Permalink
Browse files

Fix memory leak in OGR provider when feature has no geometry

and FilterRect is used

(cherry-picked from 6b80518)
  • Loading branch information
nyalldawson committed May 16, 2016
1 parent 8f0ee1f commit 7a4ef0d396d9d460b9189054eaddb428462cc5eb
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/ogr/qgsogrfeatureiterator.cpp
@@ -226,13 +226,14 @@ bool QgsOgrFeatureIterator::fetchFeature( QgsFeature& feature )
{
if ( !readFeature( fet, feature ) )
continue;
else
OGR_F_Destroy( fet );

if ( !mRequest.filterRect().isNull() && !feature.constGeometry() )
continue;

// we have a feature, end this cycle
feature.setValid( true );
OGR_F_Destroy( fet );
return true;

} // while

0 comments on commit 7a4ef0d

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