Skip to content
Permalink
Browse files

[bugfix] Crash on undo layout legend item on deleted item

Fixes #19155
  • Loading branch information
elpaso committed Jun 14, 2018
1 parent 365fbed commit 9def3470f02c06c886ad0fab6092584d99178a10
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/layertree/qgslayertreemodel.cpp
@@ -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!

0 comments on commit 9def347

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