mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 17:25:06 +00:00
LibGUI: Do not recurse into rows with invalid indices
That would cause the traversal to go into an infinite loop.
This commit is contained in:
parent
bda39ef7ab
commit
476ccb2206
1 changed files with 3 additions and 0 deletions
|
@ -183,6 +183,9 @@ void TreeView::traverse_in_paint_order(Callback callback) const
|
|||
return IterationDecision::Continue;
|
||||
}
|
||||
|
||||
if (indent_level > 0 && !index.is_valid())
|
||||
return IterationDecision::Continue;
|
||||
|
||||
++indent_level;
|
||||
int row_count = model.row_count(index);
|
||||
for (int i = 0; i < row_count; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue