summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 7e7c337d96..7562fb37a6 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -630,9 +630,8 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
ByteString key(word.Right(word.GetLength() - 1));
auto pObj = m_pSyntax->ReadNextObject(false, false, 0);
if (!key.IsEmpty()) {
- uint32_t dwObjNum = pObj ? pObj->GetObjNum() : 0;
- if (dwObjNum)
- pDict->SetNewFor<CPDF_Reference>(key, m_pDocument.Get(), dwObjNum);
+ if (pObj && !pObj->IsInline())
+ pDict->SetFor(key, pObj->MakeReference(m_pDocument.Get()));
else
pDict->SetFor(key, std::move(pObj));
}