Skip to content

Commit

Permalink
fixed a bug in SpatiaLite provider (crash following 'ALTER TABLE ADD …
Browse files Browse the repository at this point in the history
…COLUMN')

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11712 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
esseffe committed Sep 25, 2009
1 parent 35e6048 commit 70d7b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -130,6 +130,7 @@ void QgsSpatiaLiteProvider::loadFields()
char *errMsg = NULL;
QString pkName;
int pkCount = 0;
int fldNo = 0;
char xSql[1024];

attributeFields.clear();
Expand Down Expand Up @@ -177,7 +178,7 @@ void QgsSpatiaLiteProvider::loadFields()
fieldType = QVariant::Double;
}

attributeFields.insert( i - 1, QgsField( name, fieldType, type, 0, 0, "" ) );
attributeFields.insert( fldNo++, QgsField( name, fieldType, type, 0, 0, "" ) );
}
}
}
Expand Down

0 comments on commit 70d7b84

Please sign in to comment.