diff --git a/src/core/deltafilewrapper.cpp b/src/core/deltafilewrapper.cpp index 5b7d47589c..efba26ca91 100644 --- a/src/core/deltafilewrapper.cpp +++ b/src/core/deltafilewrapper.cpp @@ -996,9 +996,18 @@ void DeltaFileWrapper::setIsPushing( bool isPushing ) QJsonValue DeltaFileWrapper::geometryToJsonValue( const QgsGeometry &geom ) const { if ( geom.isNull() ) + { return QJsonValue::Null; + } + + QString wkt = geom.asWkt(); + + if ( wkt.trimmed().isEmpty() ) + { + return QJsonValue::Null; + } - return QJsonValue( geom.asWkt() ); + return QJsonValue( wkt ); }