Bug 1180189 - Fix crash in mozilla::a11y::HTMLTableRowAccessible::GroupPosition, r=MarcoZ

--HG--
extra : rebase_source : 57a1abf71f10a6c86c9f38a0ad137e3a109a536c
This commit is contained in:
Frédéric Wang 2015-07-14 09:27:26 +02:00
parent 896fc80e27
commit 9f6282f97b

View File

@ -373,8 +373,9 @@ GroupPos
HTMLTableRowAccessible::GroupPosition()
{
int32_t count = 0, index = 0;
if (nsCoreUtils::GetUIntAttr(nsAccUtils::TableFor(this)->GetContent(),
nsGkAtoms::aria_rowcount, &count) &&
Accessible* table = nsAccUtils::TableFor(this);
if (table && nsCoreUtils::GetUIntAttr(table->GetContent(),
nsGkAtoms::aria_rowcount, &count) &&
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_rowindex, &index)) {
return GroupPos(0, index, count);
}