bug 1186536 - Bail out of ProxyTextChangeEvent() if the proxy doesn't have a wrapper r=davidb

This probably should never happen, but it seems to sometimes in the wild, and
its hard to know what caused that without a test case.  So for now work around
the issue by adding a null check.
This commit is contained in:
Trevor Saunders 2015-09-08 17:08:16 -04:00
parent 9d88d046fd
commit 7d251d804b

View File

@ -76,6 +76,11 @@ a11y::ProxyTextChangeEvent(ProxyAccessible* aText, const nsString& aStr,
int32_t aStart, uint32_t aLen, bool aInsert, bool)
{
AccessibleWrap* wrapper = WrapperFor(aText);
MOZ_ASSERT(wrapper);
if (!wrapper) {
return;
}
auto text = static_cast<HyperTextAccessibleWrap*>(wrapper->AsHyperText());
if (text) {
ia2AccessibleText::UpdateTextChangeData(text, aInsert, aStr, aStart, aLen);