Index: xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp |
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp |
index 5f30d75ad414187ff3e6dc3fc7157bbc4d3321f4..0427a4a370f5acb02107249196249d88bf31bce5 100644 |
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp |
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp |
@@ -251,19 +251,19 @@ void CXFA_LayoutPageMgr::SubmitContentItem( |
} |
} |
FX_FLOAT CXFA_LayoutPageMgr::GetAvailHeight() { |
+ CXFA_ContainerLayoutItem* pLayoutItem = |
+ GetCurrentContainerRecord()->pCurContentArea; |
+ if (!pLayoutItem || !pLayoutItem->m_pFormNode) |
+ return 0.0f; |
FX_FLOAT fAvailHeight = |
- GetCurrentContainerRecord() |
- ->pCurContentArea->m_pFormNode->GetMeasure(XFA_ATTRIBUTE_H) |
- .ToUnit(XFA_UNIT_Pt); |
- if (fAvailHeight < XFA_LAYOUT_FLOAT_PERCISION) { |
- if (m_pCurrentContainerRecord == |
- m_rgProposedContainerRecord.GetHeadPosition()) { |
- fAvailHeight = 0; |
- } else { |
- fAvailHeight = XFA_LAYOUT_FLOAT_MAX; |
- } |
- } |
- return fAvailHeight; |
+ pLayoutItem->m_pFormNode->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt); |
+ if (fAvailHeight >= XFA_LAYOUT_FLOAT_PERCISION) |
+ return fAvailHeight; |
+ if (m_pCurrentContainerRecord == |
+ m_rgProposedContainerRecord.GetHeadPosition()) { |
+ return 0.0f; |
+ } |
+ return XFA_LAYOUT_FLOAT_MAX; |
} |
static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, |
FX_BOOL bNewExprStyle, |