mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Fix crash when serializing nodes for DOM inspector
Noticed this trying to inspect GitHub, you'd get a segfault due to the parent node being null here.
This commit is contained in:
@@ -1015,7 +1015,7 @@ bool Node::is_uninteresting_whitespace_node() const
|
||||
return false;
|
||||
if (!layout_node())
|
||||
return true;
|
||||
if (layout_node()->parent()->is_anonymous())
|
||||
if (auto parent = layout_node()->parent(); parent && parent->is_anonymous())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user