From 57ea3e3fe69669778a6a171a6c617866b9f9c410 Mon Sep 17 00:00:00 2001 From: James Teh Date: Mon, 11 Apr 2022 23:19:16 +0000 Subject: [PATCH] Bug 1761469: BrowserHost::GetTopLevelDocAccessible: Return null if mRoot is null. r=eeejay Differential Revision: https://phabricator.services.mozilla.com/D142186 --- dom/ipc/BrowserHost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/ipc/BrowserHost.cpp b/dom/ipc/BrowserHost.cpp index 1f363ad7778d..3cf33d66b240 100644 --- a/dom/ipc/BrowserHost.cpp +++ b/dom/ipc/BrowserHost.cpp @@ -56,7 +56,7 @@ nsILoadContext* BrowserHost::GetLoadContext() const { bool BrowserHost::CanRecv() const { return mRoot && mRoot->CanRecv(); } a11y::DocAccessibleParent* BrowserHost::GetTopLevelDocAccessible() const { - return mRoot->GetTopLevelDocAccessible(); + return mRoot ? mRoot->GetTopLevelDocAccessible() : nullptr; } void BrowserHost::LoadURL(nsDocShellLoadState* aLoadState) {