Bug 1429940 - Null-check the GetContent call on the parent. r=Jamie

--HG--
extra : rebase_source : 1f2692152b608d9283990a6051091410ad0f6fea
This commit is contained in:
Paolo Amadini 2018-11-21 15:24:13 +00:00
parent f27cfbb569
commit 37ad34fc88

View File

@ -94,9 +94,11 @@ XULLabelAccessible::RelationByType(RelationType aType) const
if (aType == RelationType::LABEL_FOR) {
Accessible* parent = Parent();
if (parent && parent->Role() == roles::GROUPING &&
parent->GetContent()->IsXULElement(nsGkAtoms::groupbox) &&
parent->GetChildAt(0) == this) {
rel.AppendTarget(parent);
nsIContent* parentContent = parent->GetContent();
if (parentContent && parentContent->IsXULElement(nsGkAtoms::groupbox)) {
rel.AppendTarget(parent);
}
}
}