Skip to content

Commit 52621b9

Browse files
committed
Followup a112dfe, fix #14451
1 parent 8b34437 commit 52621b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/layertree/qgslayertreemodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ void QgsLayerTreeModel::refreshScaleBasedLayers( const QModelIndex& idx )
943943
if ( node->nodeType() == QgsLayerTreeNode::NodeLayer )
944944
{
945945
const QgsMapLayer* layer = QgsLayerTree::toLayer( node )->layer();
946-
if ( layer->hasScaleBasedVisibility() )
946+
if ( layer && layer->hasScaleBasedVisibility() )
947947
{
948948
emit dataChanged( idx, idx );
949949
}

0 commit comments

Comments
 (0)