Skip to content
Permalink
Browse files

[afs] Correctly return an invalid feature from closed iterators

  • Loading branch information
nyalldawson committed Feb 20, 2018
1 parent b434ab1 commit 5f12bd5c279f1f146a8cfc0217bc344002ae9747
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/providers/arcgisrest/qgsafsfeatureiterator.cpp
@@ -62,6 +62,8 @@ QgsAfsFeatureIterator::~QgsAfsFeatureIterator()

bool QgsAfsFeatureIterator::fetchFeature( QgsFeature &f )
{
f.setValid( false );

if ( mClosed )
return false;

@@ -82,6 +84,7 @@ bool QgsAfsFeatureIterator::fetchFeature( QgsFeature &f )
{
bool result = mSource->sharedData()->getFeature( mRequest.filterFid(), f, fetchGeometries, fetchAttribures );
geometryToDestinationCrs( f, mTransform );
f.setValid( result );
return result;
}
else
@@ -96,6 +99,7 @@ bool QgsAfsFeatureIterator::fetchFeature( QgsFeature &f )
if ( !success )
continue;
geometryToDestinationCrs( f, mTransform );
f.setValid( true );
return true;
}
}

0 comments on commit 5f12bd5

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