Skip to content

Commit 7f0dc3c

Browse files
committed
[backport] Skip attribute values with invalid variant type (fixes ticket #4684)
1 parent c00a529 commit 7f0dc3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/qgsvectorfilewriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
456456
case QVariant::String:
457457
OGR_F_SetFieldString( poFeature, ogrField, mCodec->fromUnicode( attrValue.toString() ).data() );
458458
break;
459+
case QVariant::Invalid:
460+
break;
459461
default:
460462
mErrorMessage = QObject::tr( "Invalid variant type for field %1[%2]: received %3 with type %4" )
461463
.arg( fldIt.value().name() )

0 commit comments

Comments
 (0)