We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 8eb037c commit 8e1c65eCopy full SHA for 8e1c65e
src/providers/ogr/qgsogrprovider.cpp
@@ -629,6 +629,10 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
629
for(QgsAttributeMap::iterator it = attrs.begin(); it != attrs.end(); ++it)
630
{
631
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;
636
637
//if(!s.isEmpty())
638
// continue;
0 commit comments