Skip to content
Permalink
Browse files

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

  • Loading branch information
rldhont committed Feb 19, 2018
1 parent 4868e6c commit d0fb7fec968987d3dd5433c7c1c4981f53876d5a
Showing with 4 additions and 8 deletions.
  1. +4 −8 src/server/qgswfsserver.cpp
@@ -1973,11 +1973,9 @@ QDomElement QgsWFSServer::createFeatureGML2( QgsFeature* feat, QDomDocument& doc
typeNameElement.setAttribute( "fid", mTypeName + "." + QString::number( feat->id() ) );
featureElement.appendChild( typeNameElement );

if ( mWithGeom && mGeometryName != "NONE" )
const QgsGeometry* geom = feat->constGeometry();
if ( geom && mWithGeom && mGeometryName != "NONE" )
{
//add geometry column (as gml)
const QgsGeometry* geom = feat->constGeometry();

QDomElement geomElem = doc.createElement( "qgs:geometry" );
QDomElement gmlElem;
if ( mGeometryName == "EXTENT" )
@@ -2057,11 +2055,9 @@ QDomElement QgsWFSServer::createFeatureGML3( QgsFeature* feat, QDomDocument& doc
typeNameElement.setAttribute( "gml:id", mTypeName + "." + QString::number( feat->id() ) );
featureElement.appendChild( typeNameElement );

if ( mWithGeom && mGeometryName != "NONE" )
const QgsGeometry* geom = feat->constGeometry();
if ( geom && mWithGeom && mGeometryName != "NONE" )
{
//add geometry column (as gml)
const QgsGeometry* geom = feat->constGeometry();

QDomElement geomElem = doc.createElement( "qgs:geometry" );
QDomElement gmlElem;
if ( mGeometryName == "EXTENT" )

0 comments on commit d0fb7fe

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