Bug 1750550: Null check aAttributes in ConvertToAtkTextAttributeSet. r=eeejay

Differential Revision: https://phabricator.services.mozilla.com/D136303
This commit is contained in:
James Teh 2022-01-20 00:57:51 +00:00
parent d292d48758
commit 432bc6dbfa

View File

@ -69,6 +69,12 @@ void ConvertTextAttributeToAtkAttribute(const nsACString& aName,
static AtkAttributeSet* ConvertToAtkTextAttributeSet(
AccAttributes* aAttributes) {
if (!aAttributes) {
// This can happen if an Accessible dies in the content process, but the
// parent hasn't been udpated yet.
return nullptr;
}
AtkAttributeSet* objAttributeSet = nullptr;
for (auto iter : *aAttributes) {