Skip to content

Commit dabf1c7

Browse files
committed
[BUGFIX][Server] Segfault in WFS GetCapabilities
1 parent 07207e0 commit dabf1c7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/server/services/wfs/qgswfsgetcapabilities.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ namespace QgsWfs
421421
for ( const QString &wfsLayerId : wfsLayerIds )
422422
{
423423
QgsMapLayer *layer = project->mapLayer( wfsLayerId );
424+
if ( !layer )
425+
{
426+
continue;
427+
}
424428
if ( layer->type() != QgsMapLayer::LayerType::VectorLayer )
425429
{
426430
continue;

src/server/services/wfs/qgswfsgetcapabilities_1_0_0.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ namespace QgsWfs
266266
for ( const QString &wfsLayerId : wfsLayerIds )
267267
{
268268
QgsMapLayer *layer = project->mapLayer( wfsLayerId );
269+
if ( !layer )
270+
{
271+
continue;
272+
}
269273
if ( layer->type() != QgsMapLayer::LayerType::VectorLayer )
270274
{
271275
continue;

0 commit comments

Comments
 (0)