summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-10-21 14:50:16 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-10-21 14:50:16 -0700
commitdb01bffb1960534b19dd87b4540d4c50eca0f6bf (patch)
tree36ac66888d95eca553b22d05199fd0b9a7c5dd05 /core/src
parent767aebbef641a89498deebc29369a078207b4dcc (diff)
downloadpdfium-db01bffb1960534b19dd87b4540d4c50eca0f6bf.tar.xz
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
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp6
1 files 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)