summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index e098112ba1..97f17032b4 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -3600,10 +3600,11 @@ FX_BOOL CPDF_DataAvail::CheckHintTables(IFX_DownloadHints* pHints) {
m_syntaxParser.InitParser(m_pFileRead, m_dwHeaderOffset);
nonstd::unique_ptr<CPDF_HintTables> pHintTables(
new CPDF_HintTables(this, pDict));
- CPDF_Stream* pHintStream = (CPDF_Stream*)ParseIndirectObjectAt(szHSStart, 0);
- if (pHintStream && pHintStream->GetType() == PDFOBJ_STREAM &&
- pHintTables->LoadHintStream(pHintStream))
- m_pHintTables.reset(pHintTables.release());
+ nonstd::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> pHintStream(
+ ParseIndirectObjectAt(szHSStart, 0));
+ CPDF_Stream* pStream = ToStream(pHintStream.get());
+ if (pStream && pHintTables->LoadHintStream(pStream))
+ m_pHintTables = nonstd::move(pHintTables);
m_docStatus = PDF_DATAAVAIL_DONE;
return TRUE;