Skip to content

Commit

Permalink
Fix crash on map themes manager and null layers
Browse files Browse the repository at this point in the history
Fixes #33295
  • Loading branch information
elpaso authored and nyalldawson committed Jan 28, 2020
1 parent f5e1733 commit 74bd989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmapthemecollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}
Expand Down

0 comments on commit 74bd989

Please sign in to comment.