From 15dfc05d00dca9d8c67617abb3c1df53e29852ed Mon Sep 17 00:00:00 2001 From: Emily McDonough Date: Tue, 9 Aug 2022 22:23:17 +0000 Subject: [PATCH] Bug 1783783 - Add null-check for aParentFrame when computing used page values in nsCSSFrameConstructor r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D154135 --- layout/base/nsCSSFrameConstructor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 1b2a2aa1a0f2..5f52dc09e917 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5491,7 +5491,7 @@ void nsCSSFrameConstructor::AddFrameConstructionItemsInternal( bool pageNameBreak = false; // TODO: We should document why the TextIsOnlyWhitespace() check is needed. // This will be documented as part of fixing Bug 1782324 - if (aState.mPresContext->IsPaginated() && + if (aParentFrame && aState.mPresContext->IsPaginated() && StaticPrefs::layout_css_named_pages_enabled() && !aContent->TextIsOnlyWhitespace()) { // TODO: This is slightly incorrect! See Bug 1764437 -- 2.11.4.GIT