Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[bugfix] Crash on undo layout legend item on deleted item
Fixes #19155
  • Loading branch information
elpaso committed Jun 14, 2018
1 parent 365fbed commit 9def347
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/layertree/qgslayertreemodel.cpp
Expand Up @@ -884,14 +884,14 @@ void QgsLayerTreeModel::disconnectFromLayer( QgsLayerTreeLayer *nodeLayer )
{
disconnect( nodeLayer, nullptr, this, nullptr ); // disconnect from delayed load of layer

if ( !nodeLayer->layer() )
return; // we were never connected

if ( testFlag( ShowLegend ) )
{
removeLegendFromLayer( nodeLayer );
}

if ( !nodeLayer->layer() )
return; // we were never connected

if ( _numLayerCount( mRootNode, nodeLayer->layerId() ) == 1 )
{
// last instance of the layer in the tree: disconnect from all signals from layer!
Expand Down

0 comments on commit 9def347

Please sign in to comment.