Skip to content

Commit

Permalink
WMS Server: Test null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 25, 2020
1 parent 1eddb99 commit 8ab74ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -988,7 +988,7 @@ namespace QgsWms
{
QgsLayerTreeLayer *treeLayer = static_cast<QgsLayerTreeLayer *>( treeNode );
QgsMapLayer *l = treeLayer->layer();
if ( restrictedLayers.contains( l->name() ) ) //unpublished layer
if ( !l || restrictedLayers.contains( l->name() ) ) //unpublished layer
{
continue;
}
Expand Down

0 comments on commit 8ab74ce

Please sign in to comment.