Skip to content

Commit 0598be4

Browse files
committed
Null pointer check for the layer tree model
1 parent 026b9b0 commit 0598be4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/layertree/qgslayertreemodel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,9 @@ void QgsLayerTreeModel::nodeLayerWillBeUnloaded()
767767

768768
void QgsLayerTreeModel::layerLegendChanged()
769769
{
770+
if ( !mRootNode )
771+
return;
772+
770773
if ( !testFlag( ShowLegend ) )
771774
return;
772775

0 commit comments

Comments
 (0)