Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c13e9a9

Browse files
elpasogithub-actions[bot]
authored andcommittedOct 17, 2023
Fix crash in layout legend
Fix #52268 I couldn't identify the root cause of the issue but this check prevents the crash.
1 parent 74ae947 commit c13e9a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/gui/layertree/qgslayertreeview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void QgsLayerTreeView::modelRowsInserted( const QModelIndex &index, int start, i
251251
}
252252

253253
QList<QgsLayerTreeNode *> children = parentNode->children();
254-
for ( int i = start; i <= end; ++i )
254+
for ( int i = start; i <= end && i < children.count(); ++i )
255255
{
256256
updateExpandedStateFromNode( children[i] );
257257
}

0 commit comments

Comments
 (0)
Please sign in to comment.