From db01bffb1960534b19dd87b4540d4c50eca0f6bf Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 21 Oct 2014 14:50:16 -0700 Subject: Change the clear order of pDocPage and pDocRender pTransfer function is released in pDocRender cleanup but is still being accessed in ~CPDF_GeneralStateData in pDocPage cleanup. BUG=419320 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/662063003 --- core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp index 635fc6b0ee..c3e35d882d 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp @@ -95,13 +95,13 @@ void CPDF_Document::LoadPages() extern void FPDF_TTFaceMapper_ReleaseDoc(CPDF_Document*); CPDF_Document::~CPDF_Document() { - if (m_pDocRender) { - CPDF_ModuleMgr::Get()->GetRenderModule()->DestroyDocData(m_pDocRender); - } if (m_pDocPage) { CPDF_ModuleMgr::Get()->GetPageModule()->ReleaseDoc(this); CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this); } + if (m_pDocRender) { + CPDF_ModuleMgr::Get()->GetRenderModule()->DestroyDocData(m_pDocRender); + } } #define FX_MAX_PAGE_LEVEL 1024 CPDF_Dictionary* CPDF_Document::_FindPDFPage(CPDF_Dictionary* pPages, int iPage, int nPagesToGo, int level) -- cgit v1.2.3