mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix UAF when collapsing children of ephemeral nodes in a shift
This commit is contained in:
parent
3fbaa4adf5
commit
84317d3d2a
1 changed files with 3 additions and 1 deletions
|
@ -1426,7 +1426,9 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(
|
|||
|
||||
if (old_parent != nullptr) {
|
||||
auto& group = old_parent->data.as_group;
|
||||
if (old_parent->parent != nullptr && group.ephemeral && group.children.size() == 1) {
|
||||
if (old_parent->parent != nullptr && group.ephemeral && group.children.size() == 1
|
||||
&& !group.hasChild(&node))
|
||||
{
|
||||
Hy3Node::swallowGroups(old_parent);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue