summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fftext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_fftext.cpp')
-rw-r--r--xfa/fxfa/cxfa_fftext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_fftext.cpp b/xfa/fxfa/cxfa_fftext.cpp
index 18eb20001a..1eac4fd309 100644
--- a/xfa/fxfa/cxfa_fftext.cpp
+++ b/xfa/fxfa/cxfa_fftext.cpp
@@ -40,7 +40,8 @@ void CXFA_FFText::RenderWidget(CXFA_Graphics* pGS,
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();
CFX_RectF rtText = GetRectWithoutRotate();
- if (CXFA_MarginData marginData = m_pDataAcc->GetMarginData()) {
+ CXFA_MarginData marginData = m_pDataAcc->GetMarginData();
+ if (marginData.HasValidNode()) {
CXFA_LayoutItem* pItem = this;
if (!pItem->GetPrev() && !pItem->GetNext()) {
XFA_RectWidthoutMargin(rtText, marginData);
@@ -87,7 +88,8 @@ bool CXFA_FFText::PerformLayout() {
pItem = pItem->GetFirst();
while (pItem) {
CFX_RectF rtText = pItem->GetRect(false);
- if (CXFA_MarginData marginData = m_pDataAcc->GetMarginData()) {
+ CXFA_MarginData marginData = m_pDataAcc->GetMarginData();
+ if (marginData.HasValidNode()) {
if (!pItem->GetPrev()) {
float fTopInset;
marginData.GetTopInset(fTopInset);