commit | 0d76a139d7ffbbdfb0ef5f5e714597a25f9767c4 | [log] [tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Thu Aug 25 22:20:45 2022 +0000 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Aug 25 22:20:45 2022 +0000 |
tree | bddee1bebff867ef00c4a6b5a1ffddc89016be4e | |
parent | f27b228d600e96257f2667bd79ce4ec16c106fdf [diff] |
Avoid de-referencing end() in GetNextAvailContentHeight(). Add the same HasCurrentViewRecord() check as in other methods. Bug: chromium:1355682 Change-Id: I466f386f037801daa82ead30239f34e025748748 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96910 Reviewed-by: Lei Zhang <thestig@chromium.org> Auto-Submit: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp b/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp index d042c37..ac43d9c 100644 --- a/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp +++ b/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp
@@ -1523,6 +1523,8 @@ } bool CXFA_ViewLayoutProcessor::GetNextAvailContentHeight(float fChildHeight) { + if (!HasCurrentViewRecord()) + return false; CXFA_Node* pCurContentNode = GetCurrentViewRecord()->pCurContentArea->GetFormNode(); if (!pCurContentNode)