LibWeb: Avoid nullptr dereference when parsing grid sizes
This commit is contained in:
parent
0d4c7fa392
commit
b0a43404b9
Notes:
sideshowbarker
2024-07-17 06:45:52 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/b0a43404b9 Pull-request: https://github.com/SerenityOS/serenity/pull/19065
1 changed files with 1 additions and 1 deletions
|
@ -6349,7 +6349,7 @@ Optional<CSS::GridSize> Parser::parse_grid_size(ComponentValue const& component_
|
|||
auto const& function = component_value.function();
|
||||
if (function.name().equals_ignoring_ascii_case("calc"sv)) {
|
||||
auto calculated_style_value = parse_calculated_value(function.values());
|
||||
if (calculated_style_value.is_error()) {
|
||||
if (calculated_style_value.is_error() || calculated_style_value.value().is_null()) {
|
||||
// FIXME: Propagate error
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue