Skip to content
Permalink
Browse files

[BUGFIX][Server] Segfault when GetFeatureInfo on Raster layer to GML

The PR #6279 has introduced some bug, like a segfault when a WMS GetFeatureInfo
is done on a Raster layer with output to GML.

This commit fixes it.
  • Loading branch information
rldhont committed Jun 1, 2018
1 parent 7160bac commit 21d15e710112ea772fa67b26b2059ea792bf39e8
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/server/qgswmsserver.cpp
@@ -3322,7 +3322,9 @@ QDomElement QgsWMSServer::createFeatureGML(
{
//qgs:%TYPENAME%
QDomElement typeNameElement = doc.createElement( "qgs:" + typeName /*qgs:%TYPENAME%*/ );
QString gmlId = featureGmlId( feat, layer->dataProvider()->pkAttributeIndexes() );
QString gmlId = QString::number( feat->id() );
if ( layer ) // For raster layer, layer is null
gmlId = featureGmlId( feat, layer->dataProvider()->pkAttributeIndexes() );
typeNameElement.setAttribute( "fid", typeName + "." + gmlId );

const QgsCoordinateTransform* transform = nullptr;

0 comments on commit 21d15e7

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