From b8bf55f73390a9460ec13dbffcf5d22819f9aa12 Mon Sep 17 00:00:00 2001 From: thestig Date: Sat, 21 May 2016 21:08:05 -0700 Subject: Get rid of CPDF_Object::GetArray(). BUG=pdfium:234 Review-Url: https://codereview.chromium.org/2001783003 --- core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/fpdf_page') diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp index 4a7b6ad403..b30006bf35 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -697,7 +697,7 @@ void CPDF_StreamContentParser::Handle_SetColorSpace_Stroke() { } void CPDF_StreamContentParser::Handle_SetDash() { - CPDF_Array* pArray = GetObject(1) ? GetObject(1)->GetArray() : nullptr; + CPDF_Array* pArray = ToArray(GetObject(1)); if (!pArray) return; @@ -1305,10 +1305,10 @@ void CPDF_StreamContentParser::Handle_ShowText() { } void CPDF_StreamContentParser::Handle_ShowText_Positioning() { - CPDF_Array* pArray = GetObject(0) ? GetObject(0)->GetArray() : NULL; - if (!pArray) { + CPDF_Array* pArray = ToArray(GetObject(0)); + if (!pArray) return; - } + size_t n = pArray->GetCount(); size_t nsegs = 0; for (size_t i = 0; i < n; i++) { -- cgit v1.2.3