Commit 08eeadf3 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Fix null deref inside DCHECK

TBR=nektar@chromium.org

Bug: None
Change-Id: If65d7e630b152a48759be2016928895a06094b89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2530209Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825982}
parent 1e179add
......@@ -70,8 +70,11 @@ const BrowserAccessibility* GetTextContainerForPlainTextField(
if (child->InternalChildCount() == 1) {
const BrowserAccessibility* grand_child = child->InternalGetFirstChild();
if (grand_child->GetRole() == ax::mojom::Role::kGenericContainer) {
DCHECK_EQ(grand_child->InternalGetFirstChild()->GetRole(),
ax::mojom::Role::kStaticText);
// There is not always a static text child of the grandchild, but if there
// is, it must be static text.
DCHECK(!grand_child->InternalGetFirstChild() ||
grand_child->InternalGetFirstChild()->GetRole() ==
ax::mojom::Role::kStaticText);
return grand_child;
}
DCHECK_EQ(child->InternalGetFirstChild()->GetRole(),
......
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