From 87a8d4c605ec1c43ccd092b57e1aadf1dfe595de Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 5 Oct 2016 12:41:21 -0700 Subject: Rework a redundant check when calling ConvertToIndirectObjectAt() This avoids a re-assignment that can otherwise cause a later fault. BUG=pdfium:607 Review-Url: https://codereview.chromium.org/2393953002 --- core/fpdfapi/parser/cpdf_array.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/parser/cpdf_array.cpp') diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp index e9a92eeae6..9a2dba0161 100644 --- a/core/fpdfapi/parser/cpdf_array.cpp +++ b/core/fpdfapi/parser/cpdf_array.cpp @@ -152,7 +152,7 @@ void CPDF_Array::ConvertToIndirectObjectAt(size_t i, return; CPDF_Object* pObj = m_Objects[i]; - if (!pObj || pObj->GetObjNum() != 0) + if (!pObj || pObj->IsReference()) return; uint32_t dwObjNum = pHolder->AddIndirectObject(pObj); -- cgit v1.2.3