Skip to content
Snippets Groups Projects
Commit 68c3948d authored by James Teh's avatar James Teh
Browse files

Bug 1493403: AccGroupInfo::TotalItemCount: Don't assume a container has children. r=eeejay

The code does check for the case where a container has no children.
However, before it does so, it tries to check whether it needs to skip a text leaf child.
This check previously assumed there was a child to check, which crashed for a container with no children.

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

--HG--
extra : moz-landing-system : lando
parent c2634d44
No related branches found
No related tags found
No related merge requests found
......@@ -233,7 +233,7 @@ AccGroupInfo::TotalItemCount(Accessible* aContainer, bool* aIsHierarchical)
Accessible* childItem = AccGroupInfo::FirstItemOf(aContainer);
if (!childItem) {
childItem = aContainer->FirstChild();
if (childItem->IsTextLeaf()) {
if (childItem && childItem->IsTextLeaf()) {
// First child can be a text leaf, check its sibling for an item.
childItem = childItem->NextSibling();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment