Skip to content
Permalink
Browse files

Fix crash on map themes manager and null layers

Fixes #33295
  • Loading branch information
elpaso authored and nyalldawson committed Jan 28, 2020
1 parent f5e1733 commit 74bd989c9e1ef384820fbf2db210a8a5e6c76807
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsmapthemecollection.cpp
@@ -93,7 +93,7 @@ void QgsMapThemeCollection::createThemeFromCurrentState( QgsLayerTreeGroup *pare
else if ( QgsLayerTree::isLayer( node ) )
{
QgsLayerTreeLayer *nodeLayer = QgsLayerTree::toLayer( node );
if ( node->itemVisibilityChecked() != Qt::Unchecked )
if ( node->itemVisibilityChecked() != Qt::Unchecked && nodeLayer->layer() )
rec.mLayerRecords << createThemeLayerRecord( nodeLayer, model );
}
}

0 comments on commit 74bd989

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