Bug 714579 - Make sure the accessible isn't defunct before getting the caret offset. r=tbsaunde

This commit is contained in:
alexander 2012-02-15 07:11:00 -08:00
parent bdd3f00d0b
commit dd1d036870

View File

@ -1631,6 +1631,9 @@ nsHyperTextAccessible::GetCaretOffset(PRInt32 *aCaretOffset)
NS_ENSURE_ARG_POINTER(aCaretOffset);
*aCaretOffset = -1;
if (IsDefunct())
return NS_ERROR_FAILURE;
// Not focused focusable accessible except document accessible doesn't have
// a caret.
if (!IsDoc() && !FocusMgr()->IsFocused(this) &&