Skip to content
Permalink
Browse files

[afs] Fix crash when requesting invalid feature ID

  • Loading branch information
nyalldawson committed Feb 20, 2018
1 parent 87207dd commit 922776bf14c7c7c84cbab67832cfd7da4de6bf46
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/providers/arcgisrest/qgsafsshareddata.cpp
@@ -52,9 +52,15 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, const QgsRect
objectIds.reserve( stopId );
for ( int i = startId; i < stopId; ++i )
{
objectIds.append( mObjectIds[i] );
if ( i >= 0 && i < mObjectIds.count() )
objectIds.append( mObjectIds[i] );
}

if ( objectIds.empty() )
{
QgsDebugMsg( "No valid features IDs to fetch" );
return false;
}

// Query
QString errorTitle, errorMessage;

0 comments on commit 922776b

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