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 84d2443b0a1b16f3ef5d2c6d2dd96783beb92216
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -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.
You can’t perform that action at this time.