mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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
Notes:
sideshowbarker
2024-07-17 03:00:07 +09:00
Author: https://github.com/MacDue
Commit: 88e50869f1
Pull-request: https://github.com/SerenityOS/serenity/pull/16562
Reviewed-by: https://github.com/trflynn89 ✅
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