summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffimage.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffimage.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_ffimage.cpp b/xfa/fxfa/cxfa_ffimage.cpp
index 61f50be9ba..e7dc715eb7 100644
--- a/xfa/fxfa/cxfa_ffimage.cpp
+++ b/xfa/fxfa/cxfa_ffimage.cpp
@@ -49,12 +49,14 @@ void CXFA_FFImage::RenderWidget(CXFA_Graphics* pGS,
return;
CFX_RectF rtImage = GetRectWithoutRotate();
- if (CXFA_MarginData marginData = m_pDataAcc->GetMarginData())
+ CXFA_MarginData marginData = m_pDataAcc->GetMarginData();
+ if (marginData.HasValidNode())
XFA_RectWidthoutMargin(rtImage, marginData);
int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left;
int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top;
- if (CXFA_ParaData paraData = m_pDataAcc->GetParaData()) {
+ CXFA_ParaData paraData = m_pDataAcc->GetParaData();
+ if (paraData.HasValidNode()) {
iHorzAlign = paraData.GetHorizontalAlign();
iVertAlign = paraData.GetVerticalAlign();
}