Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed ticket #784.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7344 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 7, 2007
1 parent b6ecfb8 commit b030cf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -629,6 +629,10 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
for(QgsAttributeMap::iterator it = attrs.begin(); it != attrs.end(); ++it)
{
int targetAttributeId = it.key();

// don't try to set field from attribute map if it's not present in layer
if (targetAttributeId >= fdef->GetFieldCount())
continue;

//if(!s.isEmpty())
// continue;
Expand Down

0 comments on commit b030cf9

Please sign in to comment.