Skip to content

Commit

Permalink
spatialite provider: fix requests with attribute subsets
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 22, 2013
1 parent f7beac6 commit fa90fc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialitefeatureiterator.cpp
Expand Up @@ -324,7 +324,7 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f
{
if ( subsetAttributes )
{
if ( mRequest.subsetOfAttributes().contains( ic - 1 ) )
if ( ic <= mRequest.subsetOfAttributes().size() )
{
int attrIndex = mRequest.subsetOfAttributes()[ic-1];
feature.setAttribute( attrIndex, getFeatureAttribute( stmt, ic, P->attributeFields[attrIndex].type() ) );
Expand Down

0 comments on commit fa90fc9

Please sign in to comment.