Skip to content
Permalink
Browse files

Do not return invalid layers from findLayers()

  • Loading branch information
elpaso committed Jun 7, 2018
1 parent ec909b0 commit 2f2221aec7a12138dacccd40ac3a34573e3a5da3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/layertree/qgslayertreegroup.cpp
@@ -221,7 +221,7 @@ QList<QgsLayerTreeLayer *> QgsLayerTreeGroup::findLayers() const
QList<QgsLayerTreeLayer *> list;
Q_FOREACH ( QgsLayerTreeNode *child, mChildren )
{
if ( QgsLayerTree::isLayer( child ) )
if ( QgsLayerTree::isLayer( child ) && QgsLayerTree::toLayer( child )->layer( ) )
list << QgsLayerTree::toLayer( child );
else if ( QgsLayerTree::isGroup( child ) )
list << QgsLayerTree::toGroup( child )->findLayers();

0 comments on commit 2f2221a

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