[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-08-30 04:12:05 +00:00
committed by GitHub
parent 583f5d65d8
commit 0ffd44874e

View File

@@ -23,13 +23,13 @@ JSYogaNode::~JSYogaNode()
if (m_node) {
// Clear the context pointer to avoid callbacks during cleanup
YGNodeSetContext(m_node, nullptr);
// Remove from parent to avoid use-after-free when parent tries to clear owner
YGNodeRef parent = YGNodeGetParent(m_node);
if (parent) {
YGNodeRemoveChild(parent, m_node);
}
YGNodeFree(m_node);
clearInternal();
}