bug 1146518 - Only pass hyper links to MaiHyperlink::MaiHyperlink r=surkov

This commit is contained in:
Trevor Saunders 2015-04-21 16:30:14 -04:00
parent 483acccf3a
commit 9d2eb81fdd
2 changed files with 1 additions and 4 deletions

View File

@ -94,9 +94,6 @@ MaiHyperlink::MaiHyperlink(Accessible* aHyperLink) :
mHyperlink(aHyperLink), mHyperlink(aHyperLink),
mMaiAtkHyperlink(nullptr) mMaiAtkHyperlink(nullptr)
{ {
if (!mHyperlink->IsLink())
return;
mMaiAtkHyperlink = mMaiAtkHyperlink =
reinterpret_cast<AtkHyperlink *> reinterpret_cast<AtkHyperlink *>
(g_object_new(mai_atk_hyperlink_get_type(), nullptr)); (g_object_new(mai_atk_hyperlink_get_type(), nullptr));

View File

@ -27,7 +27,7 @@ getLinkCB(AtkHypertext *aText, gint aLinkIndex)
NS_ENSURE_TRUE(hyperText, nullptr); NS_ENSURE_TRUE(hyperText, nullptr);
Accessible* hyperLink = hyperText->LinkAt(aLinkIndex); Accessible* hyperLink = hyperText->LinkAt(aLinkIndex);
if (!hyperLink) { if (!hyperLink || !hyperLink->IsLink()) {
return nullptr; return nullptr;
} }