Skip to content

Commit e7e2c08

Browse files
committed
skip null values in vector file writer (fixes #5172)
1 parent a965fca commit e7e2c08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/qgsvectorfilewriter.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
449449
const QVariant& attrValue = feature.attributeMap()[ fldIt.key()];
450450
int ogrField = mAttrIdxToOgrIdx[ fldIt.key()];
451451

452+
if ( attrValue.isNull() )
453+
continue;
454+
452455
switch ( attrValue.type() )
453456
{
454457
case QVariant::Int:

0 commit comments

Comments
 (0)