Skip to content
Permalink
Browse files
Try to fix postgres provider handling of missing attributes
  • Loading branch information
nyalldawson committed Feb 17, 2018
1 parent 877efca commit 84d2443
Showing 1 changed file with 1 addition and 1 deletion.
@@ -2158,7 +2158,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist, Flags flags )
for ( int i = 0; i < fieldId.size(); i++ )
{
int attrIdx = fieldId[i];
QVariant value = attrs.at( attrIdx );
QVariant value = attrIdx < attrs.length() ? attrs.at( attrIdx ) : QVariant( QVariant::Int );

QString v;
if ( value.isNull() )

0 comments on commit 84d2443

Please sign in to comment.