Commit 8dc9f508 authored by Jacobo Aragunde Pérez's avatar Jacobo Aragunde Pérez Committed by Commit Bot

Prevent null pointer dereference.

Bug: 1072330
Change-Id: I0710128272b10adf7365235c865e47159950a458
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159472
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761071}
parent 642cf5c5
......@@ -3412,6 +3412,8 @@ void AXNodeObject::ComputeAriaOwnsChildren(
// last child: https://html.spec.whatwg.org/#the-figcaption-element
static Element* GetChildFigcaption(const Node& node) {
Element* element = ElementTraversal::FirstChild(node);
if (!element)
return nullptr;
if (element->HasTagName(html_names::kFigcaptionTag))
return element;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment