mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 13:09:41 +00:00
LibWeb: Avoid dereferencing a null pointer to document
This commit is contained in:
parent
66d18170c6
commit
01be928a16
Notes:
github-actions[bot]
2025-09-10 15:58:41 +00:00
Author: https://github.com/pranair 🔰
Commit: 01be928a16
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6081
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 24 additions and 1 deletions
|
@ -754,7 +754,12 @@ GC::Ptr<CSSPropertyRule> Parser::convert_to_property_rule(AtRule const& rule)
|
|||
return {};
|
||||
}
|
||||
|
||||
auto parsing_params = CSS::Parser::ParsingParams { *document() };
|
||||
CSS::Parser::ParsingParams parsing_params;
|
||||
if (document())
|
||||
parsing_params = CSS::Parser::ParsingParams { *document() };
|
||||
else
|
||||
parsing_params = CSS::Parser::ParsingParams { realm() };
|
||||
|
||||
auto syntax_component_values = parse_component_values_list(parsing_params, syntax_maybe.value());
|
||||
auto maybe_syntax = parse_as_syntax(syntax_component_values);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue