Skip to content

Commit

Permalink
[backport] Skip attribute values with invalid variant type (fixes tic…
Browse files Browse the repository at this point in the history
…ket #4684)
  • Loading branch information
mhugent committed Dec 21, 2011
1 parent c00a529 commit 7f0dc3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -456,6 +456,8 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
case QVariant::String:
OGR_F_SetFieldString( poFeature, ogrField, mCodec->fromUnicode( attrValue.toString() ).data() );
break;
case QVariant::Invalid:
break;
default:
mErrorMessage = QObject::tr( "Invalid variant type for field %1[%2]: received %3 with type %4" )
.arg( fldIt.value().name() )
Expand Down

0 comments on commit 7f0dc3c

Please sign in to comment.