summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index d4fc5c7900..cc2a767039 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -1835,11 +1835,9 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
pStreamDict->SetFor("Resources", pStreamResList);
}
- if (pStreamResList) {
- CPDF_Dictionary* pXObject = new CPDF_Dictionary;
- pXObject->SetReferenceFor(sImageAlias, pDoc, pImage);
- pStreamResList->SetFor("XObject", pXObject);
- }
+ CPDF_Dictionary* pXObject = new CPDF_Dictionary;
+ pXObject->SetReferenceFor(sImageAlias, pDoc, pImage->GetObjNum());
+ pStreamResList->SetFor("XObject", pXObject);
}
void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) {