From a20612a878835cb5c2b639efef1c1d47ee04e6a1 Mon Sep 17 00:00:00 2001 From: Morgan Reschenberg Date: Mon, 30 Sep 2019 16:23:30 +0000 Subject: [PATCH] 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 --- accessible/generic/HyperTextAccessible.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accessible/generic/HyperTextAccessible.cpp b/accessible/generic/HyperTextAccessible.cpp index 2ce7b005a522..9e5cc77622f1 100644 --- a/accessible/generic/HyperTextAccessible.cpp +++ b/accessible/generic/HyperTextAccessible.cpp @@ -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;