Skip to content
Permalink
Browse files

Merge pull request #7873 from m-kuhn/avoidCrash

Check layer pointer for validity
  • Loading branch information
m-kuhn committed Sep 13, 2018
2 parents 9e40a78 + 561586f commit cbb0e76520ac805154e16bded58da0f44b5b6056
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -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;

0 comments on commit cbb0e76

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