diff options
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_widget.cpp | 8 |
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) { |