Skip to content

Commit fa90fc9

Browse files
committed
spatialite provider: fix requests with attribute subsets
1 parent f7beac6 commit fa90fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/spatialite/qgsspatialitefeatureiterator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f
324324
{
325325
if ( subsetAttributes )
326326
{
327-
if ( mRequest.subsetOfAttributes().contains( ic - 1 ) )
327+
if ( ic <= mRequest.subsetOfAttributes().size() )
328328
{
329329
int attrIndex = mRequest.subsetOfAttributes()[ic-1];
330330
feature.setAttribute( attrIndex, getFeatureAttribute( stmt, ic, P->attributeFields[attrIndex].type() ) );

0 commit comments

Comments
 (0)