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
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Jan 28, 2020
1 parent 3944db4 commit e28feaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmapthemecollection.cpp
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 e28feaf

Please sign in to comment.