mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +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:
parent
f11e6beca8
commit
88e50869f1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue