From 5e6a80d7a8e89e3172861602e3619616fa47b68d Mon Sep 17 00:00:00 2001 From: "Christian Holler (:decoder)" Date: Mon, 4 Sep 2023 15:25:22 +0000 Subject: [PATCH] Bug 1847728 - Handle nullptr in RemoteAccessible::ApplyCache. r=Jamie Differential Revision: https://phabricator.services.mozilla.com/D185691 --- accessible/ipc/RemoteAccessible.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/accessible/ipc/RemoteAccessible.cpp b/accessible/ipc/RemoteAccessible.cpp index 69dee522e5fa..6fa97bd28460 100644 --- a/accessible/ipc/RemoteAccessible.cpp +++ b/accessible/ipc/RemoteAccessible.cpp @@ -183,6 +183,11 @@ RemoteAccessible* RemoteAccessible::RemoteParent() const { void RemoteAccessible::ApplyCache(CacheUpdateType aUpdateType, AccAttributes* aFields) { + if (!aFields) { + MOZ_ASSERT_UNREACHABLE("ApplyCache called with aFields == null"); + return; + } + const nsTArray relUpdatesNeeded = PreProcessRelations(aFields); if (auto maybeViewportCache = aFields->GetAttribute>(CacheKey::Viewport)) {