Skip to content

Commit

Permalink
Fix parent pointer corruption in intoGroup
Browse files Browse the repository at this point in the history
This appears to be what caused group movement related segfaults.
  • Loading branch information
outfoxxed committed May 4, 2023
1 parent 43a4aa2 commit f12993e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Hy3Layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,13 @@ Hy3Node* Hy3Node::removeFromParentRecursive() {
Hy3Node* Hy3Node::intoGroup(Hy3GroupLayout layout) {
this->layout->nodes.push_back({
.parent = this,
.data = this->data,
.data = layout,
.workspace_id = this->workspace_id,
.layout = this->layout,
});

auto* node = &this->layout->nodes.back();
swapData(*this, *node);

this->data = layout;
this->data.as_group.children.push_back(node);
Expand Down

0 comments on commit f12993e

Please sign in to comment.