diff options
author | Lei Zhang <thestig@chromium.org> | 2018-06-05 18:40:02 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-05 18:40:02 +0000 |
commit | a9f327580558a96f659e96157731f21c6abbb951 (patch) | |
tree | df2fb31c35a7067568ddcbbc191d76505185f3b1 /core | |
parent | e9f7db9dbb2c5b9d1953c6643e1c38f82130f98b (diff) | |
download | pdfium-a9f327580558a96f659e96157731f21c6abbb951.tar.xz |
Assert CPDF_ContentParser always has a valid page holder.
Change-Id: Ia9b3066c8076ed296125bf514c07f7118c52dd05
Reviewed-on: https://pdfium-review.googlesource.com/33850
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/page/cpdf_contentparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index 82f288f22b..c079f99cbf 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -23,7 +23,8 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Page* pPage) : m_CurrentStage(Stage::kGetContent), m_pObjectHolder(pPage) { - if (!pPage || !pPage->GetDocument() || !pPage->GetFormDict()) { + ASSERT(pPage); + if (!pPage->GetDocument() || !pPage->GetFormDict()) { m_CurrentStage = Stage::kComplete; return; } @@ -66,6 +67,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm, : m_CurrentStage(Stage::kParse), m_pObjectHolder(pForm), m_pType3Char(pType3Char) { + ASSERT(pForm); CFX_Matrix form_matrix = pForm->GetFormDict()->GetMatrixFor("Matrix"); if (pGraphicStates) form_matrix.Concat(pGraphicStates->m_CTM); |