mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 17:33:12 +00:00
LibWeb: Check parent node exists before checking its type
This commit is contained in:
parent
8002efe780
commit
d1678e03ff
Notes:
github-actions[bot]
2025-07-15 06:39:00 +00:00
Author: https://github.com/tcl3
Commit: d1678e03ff
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5448
Reviewed-by: https://github.com/shannonbooth ✅
2 changed files with 8 additions and 1 deletions
|
@ -232,7 +232,7 @@ void XMLDocumentBuilder::element_end(const XML::Name& name)
|
|||
};
|
||||
|
||||
auto* parent = m_current_node->parent_node();
|
||||
if (parent->is_document_fragment()) {
|
||||
if (parent && parent->is_document_fragment()) {
|
||||
auto template_parent_node = m_template_node_stack.take_last();
|
||||
parent = template_parent_node.ptr();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue