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 7a4ef0d
Showing 1 changed file with 2 additions and 1 deletion.
@@ -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.