LibWeb: Avoid nullptr dereference when parsing grid sizes

This commit is contained in:
Sam Atkins 2023-05-26 16:39:45 +01:00 committed by Andreas Kling
parent 0d4c7fa392
commit b0a43404b9
Notes: sideshowbarker 2024-07-17 06:45:52 +09:00

View File

@ -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 {};
}