mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Server landing page: don't crash on bad layers
This commit is contained in:
parent
4f834cafb8
commit
5d678a57a9
@ -583,7 +583,7 @@ json QgsLandingPageUtils::layerTree( const QgsProject &project, const QStringLis
|
||||
if ( QgsLayerTree::isLayer( node ) )
|
||||
{
|
||||
const QgsLayerTreeLayer *l { static_cast<const QgsLayerTreeLayer *>( node ) };
|
||||
if ( ( l->layer()->type() == QgsMapLayerType::VectorLayer || l->layer()->type() == QgsMapLayerType::RasterLayer )
|
||||
if ( l->layer() && ( l->layer()->type() == QgsMapLayerType::VectorLayer || l->layer()->type() == QgsMapLayerType::RasterLayer )
|
||||
&& ! wmsRestrictedLayers.contains( l->name() ) )
|
||||
{
|
||||
rec[ "id" ] = l->layerId().toStdString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user