Skip to content
Permalink
Browse files

[BUGFIX][Server] WFS GetFeature GML: segfault with geometry null

  • Loading branch information
rldhont committed Feb 20, 2018
1 parent b719441 commit 158207301146ee6e1f7828b48d58fe674287e0c7
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/server/services/wfs/qgswfsgetfeature.cpp
@@ -1245,11 +1245,10 @@ namespace QgsWfs
typeNameElement.setAttribute( QStringLiteral( "fid" ), params.typeName + "." + QString::number( feat->id() ) );
featureElement.appendChild( typeNameElement );

if ( params.withGeom && params.geometryName != QLatin1String( "NONE" ) )
//add geometry column (as gml)
QgsGeometry geom = feat->geometry();
if ( geom && params.withGeom && params.geometryName != QLatin1String( "NONE" ) )
{
//add geometry column (as gml)
QgsGeometry geom = feat->geometry();

int prec = params.precision;
QgsCoordinateReferenceSystem crs = params.crs;
Q_NOWARN_DEPRECATED_PUSH
@@ -1348,11 +1347,10 @@ namespace QgsWfs
typeNameElement.setAttribute( QStringLiteral( "gml:id" ), params.typeName + "." + QString::number( feat->id() ) );
featureElement.appendChild( typeNameElement );

if ( params.withGeom && params.geometryName != QLatin1String( "NONE" ) )
//add geometry column (as gml)
QgsGeometry geom = feat->geometry();
if ( geom && params.withGeom && params.geometryName != QLatin1String( "NONE" ) )
{
//add geometry column (as gml)
QgsGeometry geom = feat->geometry();

int prec = params.precision;
QgsCoordinateReferenceSystem crs = params.crs;
Q_NOWARN_DEPRECATED_PUSH

0 comments on commit 1582073

Please sign in to comment.
You can’t perform that action at this time.