[M104] 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>
(cherry picked from commit 0d76a139d7ffbbdfb0ef5f5e714597a25f9767c4)
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/97738
Commit-Queue: Tom Sepez <tsepez@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)