summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Layout/LayoutNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibHTML/Layout/LayoutNode.cpp')
-rw-r--r--Libraries/LibHTML/Layout/LayoutNode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibHTML/Layout/LayoutNode.cpp b/Libraries/LibHTML/Layout/LayoutNode.cpp
index e1d3ebd5be..21f9995421 100644
--- a/Libraries/LibHTML/Layout/LayoutNode.cpp
+++ b/Libraries/LibHTML/Layout/LayoutNode.cpp
@@ -11,10 +11,14 @@ LayoutNode::LayoutNode(const Node* node, RefPtr<StyleProperties> style_propertie
: m_node(node)
, m_style_properties(move(style_properties))
{
+ if (m_node)
+ m_node->set_layout_node({}, this);
}
LayoutNode::~LayoutNode()
{
+ if (m_node)
+ m_node->set_layout_node({}, nullptr);
}
void LayoutNode::layout()