Skip to content

Commit

Permalink
Don't crash when loading a project with unreachable wfs layers
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Mar 6, 2018
1 parent 05484dc commit 283f3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/layertree/qgslayertreemapcanvasbridge.cpp
Expand Up @@ -109,7 +109,7 @@ void QgsLayerTreeMapCanvasBridge::setCanvasLayers( QgsLayerTreeNode *node, QList
if ( QgsLayerTree::isLayer( node ) )
{
QgsLayerTreeLayer *nodeLayer = QgsLayerTree::toLayer( node );
if ( nodeLayer->layer()->isSpatial() )
if ( nodeLayer->layer() && nodeLayer->layer()->isSpatial() )
{
allLayers << nodeLayer->layer();
if ( nodeLayer->isVisible() )
Expand Down

2 comments on commit 283f3b8

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elpaso this will need backporting to 3.0 also

@elpaso
Copy link
Contributor Author

@elpaso elpaso commented on 283f3b8 Mar 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks for reminding me

Please sign in to comment.