Skip to content

Commit 113e6fb

Browse files
committed
Memory provider iterator: setFields on filtered requests
... so QGIS doesn't crash on name based lookups of attributes
1 parent 7748102 commit 113e6fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/providers/memory/qgsmemoryfeatureiterator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ bool QgsMemoryFeatureIterator::nextFeatureUsingList( QgsFeature& feature )
107107
else
108108
close();
109109

110+
if ( hasFeature )
111+
feature.setFields( &P->mFields ); // allow name-based attribute lookups
112+
110113
return hasFeature;
111114
}
112115

0 commit comments

Comments
 (0)