mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:42:13 +00:00
LibWeb: Don't deref HTMLInputElement parent if its null
Don't crash in case the elements parent is null.
This commit is contained in:
parent
245e3b9c3a
commit
ed1a7aee43
1 changed files with 5 additions and 3 deletions
|
@ -88,9 +88,11 @@ void HTMLInputElement::set_checked(bool checked, ChangeSource change_source)
|
||||||
|
|
||||||
// This element's :checked pseudo-class could be used in a sibling's sibling-selector,
|
// This element's :checked pseudo-class could be used in a sibling's sibling-selector,
|
||||||
// so we need to invalidate the style of all siblings.
|
// so we need to invalidate the style of all siblings.
|
||||||
parent()->for_each_child([&](auto& child) {
|
if (parent()) {
|
||||||
child.invalidate_style();
|
parent()->for_each_child([&](auto& child) {
|
||||||
});
|
child.invalidate_style();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTMLInputElement::set_checked_binding(bool checked)
|
void HTMLInputElement::set_checked_binding(bool checked)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue