Skip to content

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,10 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
629629
for(QgsAttributeMap::iterator it = attrs.begin(); it != attrs.end(); ++it)
630630
{
631631
int targetAttributeId = it.key();
632+
633+
// don't try to set field from attribute map if it's not present in layer
634+
if (targetAttributeId >= fdef->GetFieldCount())
635+
continue;
632636

633637
//if(!s.isEmpty())
634638
// continue;

0 commit comments

Comments
 (0)
Please sign in to comment.