Bug 1584465: Null check parent accessible before attribute check to cover root case. r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D47488

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Morgan Reschenberg 2019-09-30 16:23:30 +00:00
parent 47ee24af1f
commit a20612a878

View File

@ -300,7 +300,7 @@ uint32_t HyperTextAccessible::TransformOffset(Accessible* aDescendant,
// bulleted lists here because PeekOffset returns the inner text node
// for a list when it should return the list bullet.
// We manually set the offset so the error doesn't propagate up.
if (offset == 0 && descendant->Parent()->IsHTMLListItem() &&
if (offset == 0 && parent && parent->IsHTMLListItem() &&
descendant->PrevSibling() && descendant->PrevSibling()->GetFrame() &&
descendant->PrevSibling()->GetFrame()->IsBulletFrame()) {
offset = 0;