summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffimageedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffimageedit.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffimageedit.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffimageedit.cpp b/xfa/fxfa/cxfa_ffimageedit.cpp
index 41f659e8f3..38ece830d7 100644
--- a/xfa/fxfa/cxfa_ffimageedit.cpp
+++ b/xfa/fxfa/cxfa_ffimageedit.cpp
@@ -70,14 +70,17 @@ void CXFA_FFImageEdit::RenderWidget(CXFA_Graphics* pGS,
CFX_RectF rtImage = m_pNormalWidget->GetWidgetRect();
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();
}
int32_t iAspect = XFA_ATTRIBUTEENUM_Fit;
- if (CXFA_ValueData valueData = m_pDataAcc->GetFormValueData()) {
- if (CXFA_ImageData imageData = valueData.GetImageData())
+ CXFA_ValueData valueData = m_pDataAcc->GetFormValueData();
+ if (valueData.HasValidNode()) {
+ CXFA_ImageData imageData = valueData.GetImageData();
+ if (imageData.HasValidNode())
iAspect = imageData.GetAspect();
}