Skip to content

Commit

Permalink
Merge pull request #7873 from m-kuhn/avoidCrash
Browse files Browse the repository at this point in the history
Check layer pointer for validity
  • Loading branch information
m-kuhn committed Sep 13, 2018
2 parents 9e40a78 + 561586f commit cbb0e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -12056,7 +12056,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 cbb0e76

Please sign in to comment.