mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-04 09:14:21 +03:00
LibWeb: Avoid dereferencing null pointer
Null check was missing and we would crash when dereferencing the pointer to access the type() member.
This commit is contained in:
parent
f1dd4f42bc
commit
7d23af49c2
Notes:
sideshowbarker
2024-07-17 00:26:33 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/7d23af49c2 Pull-request: https://github.com/SerenityOS/serenity/pull/17463 Reviewed-by: https://github.com/linusg
@ -83,7 +83,7 @@ WebIDL::ExceptionOr<Optional<HashMapWithVectorOfFormDataEntryValue>> construct_e
|
||||
}
|
||||
|
||||
// 2. If the field element is an input element whose type attribute is in the Image Button state, then:
|
||||
if (auto* input_element = dynamic_cast<HTML::HTMLInputElement*>(control.ptr()); input_element->type() == "image") {
|
||||
if (auto* input_element = dynamic_cast<HTML::HTMLInputElement*>(control.ptr()); input_element && input_element->type() == "image") {
|
||||
// FIXME: 1. If the field element has a name attribute specified and its value is not the empty string, let name be that value followed by a single U+002E FULL STOP character (.). Otherwise, let name be the empty string.
|
||||
// FIXME: 2. Let namex be the string consisting of the concatenation of name and a single U0078 LATIN SMALL LETTER X character (x).
|
||||
// FIXME: 3. Let namey be the string consisting of the concatenation of name and a single U+0079 LATIN SMALL LETTER Y character (y).
|
||||
|
Loading…
Reference in New Issue
Block a user