Skip to content

Commit

Permalink
IconGroupContainer/force_reposition: Fix crash (use after free)
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Jul 28, 2024
1 parent 66679ca commit 72ee7e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Widgets/IconGroupContainer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,15 @@ namespace Gala {

foreach (var child in children) {
if (child is IconGroup) {
child.ref (); //The list only contains weak references so make sure the child isn't freed before it's added again
remove_group ((IconGroup) child);
}
}

foreach (var child in children) {
if (child is IconGroup) {
add_group ((IconGroup) child);
child.unref ();
}
}
}
Expand Down

0 comments on commit 72ee7e1

Please sign in to comment.