Skip to content

Commit

Permalink
Check layer pointer for validity
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 12, 2018
1 parent 85ff90f commit 561586f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -12054,7 +12054,7 @@ void QgisApp::legendLayerSelectionChanged()
bool removeEnabled = true;
for ( QgsLayerTreeLayer *nodeLayer : selectedLayers )
{
if ( !nodeLayer->layer()->flags().testFlag( QgsMapLayer::Removable ) )
if ( nodeLayer->layer() && !nodeLayer->layer()->flags().testFlag( QgsMapLayer::Removable ) )
{
removeEnabled = false;
break;
Expand Down

0 comments on commit 561586f

Please sign in to comment.