mirror of
https://github.com/elementary/gala.git
synced 2024-11-25 03:06:14 +01:00
IconGroupContainer/force_reposition: Fix crash (use after free)
This commit is contained in:
parent
66679ca796
commit
72ee7e1d75
@ -153,6 +153,7 @@ 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);
|
||||
}
|
||||
}
|
||||
@ -160,6 +161,7 @@ namespace Gala {
|
||||
foreach (var child in children) {
|
||||
if (child is IconGroup) {
|
||||
add_group ((IconGroup) child);
|
||||
child.unref ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user