Skip to content

Commit

Permalink
fixes crash on doing a feature request with filterType FilterFid and …
Browse files Browse the repository at this point in the history
…the falag ExactInteresect since the mRectEngine is null on filterType FilterFid
  • Loading branch information
signedav committed Feb 12, 2021
1 parent 4137287 commit e9623a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp
Expand Up @@ -327,7 +327,7 @@ bool QgsVirtualLayerFeatureIterator::fetchFeature( QgsFeature &feature )

// if the FilterRect has not been applied on the query
// apply it here by skipping features until they intersect
if ( mSource->mDefinition.uid().isNull() && feature.hasGeometry() && mSource->mDefinition.hasDefinedGeometry() && !mFilterRect.isNull() )
if ( mSource->mDefinition.uid().isNull() && mRequest.filterType() != QgsFeatureRequest::FilterFid && feature.hasGeometry() && mSource->mDefinition.hasDefinedGeometry() && !mFilterRect.isNull() )
{
if ( mRequest.flags() & QgsFeatureRequest::ExactIntersect )
{
Expand Down

0 comments on commit e9623a4

Please sign in to comment.