summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-14 16:59:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-14 16:59:10 -0700
commit3ba098595ae56b64eacc0c25ab76b89a4d78d920 (patch)
tree5c4db47295ea64cdf236c32ef7d5af5b8e7af232 /fpdfsdk/cpdfsdk_widget.cpp
parent1d023881cd53485303c0fcc0b5878e700dc470fd (diff)
downloadpdfium-3ba098595ae56b64eacc0c25ab76b89a4d78d920.tar.xz
Update CPDF_IndirectObjectHolder APIs for unique objects.
Doing so highlights a few places where ownership is dubious. Add convenience functions to return an unowned reference to a newly-created indirect object. Review-Url: https://codereview.chromium.org/2419173002
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index e1624a08b5..62bfcf7bd7 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -1811,7 +1811,7 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
}
CPDF_Dictionary* pXObject = new CPDF_Dictionary(pDoc->GetByteStringPool());
- pXObject->SetReferenceFor(sImageAlias, pDoc, pImage->GetObjNum());
+ pXObject->SetReferenceFor(sImageAlias, pDoc, pImage);
pStreamResList->SetFor("XObject", pXObject);
}