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 70273b9 commit 1a7ccd0Copy full SHA for 1a7ccd0
src/providers/ogr/qgsogrprovider.cpp
@@ -1023,7 +1023,7 @@ bool QgsOgrProvider::addFeature( QgsFeature& f )
1023
int targetAttributeId = it.key();
1024
1025
// don't try to set field from attribute map if it's not present in layer
1026
- if ( targetAttributeId >= OGR_FD_GetFieldCount( fdef ) )
+ if ( targetAttributeId < 0 || targetAttributeId >= OGR_FD_GetFieldCount( fdef ) )
1027
continue;
1028
1029
//if(!s.isEmpty())
0 commit comments