From 2d16308298f236ae81aa11a53f2d4e25b502dfac Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Fri, 4 Dec 2015 16:17:33 -0800 Subject: Fix an incorrect check in CPDF_DataAvail::CheckHintTables. R=tsepez@chromium.org, jun_fang@foxitsoftware.com BUG=566179 Review URL: https://codereview.chromium.org/1504513002 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index d5664c29ab..b28bbf169b 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -3599,13 +3599,10 @@ FX_BOOL CPDF_DataAvail::CheckHintTables(IFX_DownloadHints* pHints) { nonstd::unique_ptr pHintTables( new CPDF_HintTables(this, pDict)); CPDF_Stream* pHintStream = (CPDF_Stream*)ParseIndirectObjectAt(szHSStart, 0); - FX_BOOL bLoaded = FALSE; - if (pHintTables && pHintStream && pHintStream->GetType() == PDFOBJ_STREAM) { - bLoaded = pHintTables->LoadHintStream(pHintStream); - } - if (!bLoaded) { + if (pHintStream && pHintStream->GetType() == PDFOBJ_STREAM && + pHintTables->LoadHintStream(pHintStream)) m_pHintTables.reset(pHintTables.release()); - } + m_docStatus = PDF_DATAAVAIL_DONE; return TRUE; } -- cgit v1.2.3