From b8a8c43f394277d1f87320a4f01b4d5c38e81113 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 4 May 2017 14:10:50 -0700 Subject: CPDF_Document::GetPageData() normally does not return NULL. Add a comment to clarify and remove some unneeded checks. Change-Id: I8b0492548b245abc45e161085047c9f36d6c8e2b Reviewed-on: https://pdfium-review.googlesource.com/4871 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fpdfapi/parser/cpdf_document.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/fpdfapi/parser/cpdf_document.h') diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h index 2f54ba7c28..f7fb6308c1 100644 --- a/core/fpdfapi/parser/cpdf_document.h +++ b/core/fpdfapi/parser/cpdf_document.h @@ -58,6 +58,8 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { CPDF_Dictionary* GetPage(int iPage); int GetPageIndex(uint32_t objnum); uint32_t GetUserPermissions() const; + + // Returns a valid pointer, unless it is called during destruction. CPDF_DocPageData* GetPageData() const { return m_pDocPage.get(); } void SetPageObjNum(int iPage, uint32_t objNum); -- cgit v1.2.3