diff options
author | tsepez <tsepez@chromium.org> | 2016-10-05 12:41:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-05 12:41:21 -0700 |
commit | 87a8d4c605ec1c43ccd092b57e1aadf1dfe595de (patch) | |
tree | c730df68c5b8dc20e24874f38aefe3fbaee95bcb /core/fpdfapi/parser/cpdf_array.cpp | |
parent | 8afe15a019c78a24168ebc42306342c25358ccdf (diff) | |
download | pdfium-87a8d4c605ec1c43ccd092b57e1aadf1dfe595de.tar.xz |
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
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_array.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |