Skip to content

Commit 8e1c65e

Browse files
author
wonder
committedNov 7, 2007
Fixed ticket #784.
git-svn-id: http://svn.osgeo.org/qgis/trunk@7344 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8eb037c commit 8e1c65e

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.