summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-09-14 21:56:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-14 21:56:59 +0000
commitc6ab97b5b5be7083c4929b7f08b33203a7f932da (patch)
treef7d7baca1425d1a2928abd490ffdd9cf19075d2b /core/fpdfapi
parent5091a49b4a0549375a196a6f8c539f25ff48c3e7 (diff)
downloadpdfium-c6ab97b5b5be7083c4929b7f08b33203a7f932da.tar.xz
Use UnownedPtr in CFX_UnicodeEncoding.
Change-Id: I410909be359a5b5bb0c90d42064144771183525e Reviewed-on: https://pdfium-review.googlesource.com/42461 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 7119e7649a..233b98e3af 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -188,6 +188,8 @@ CPDF_Document::CPDF_Document()
m_pDocRender(pdfium::MakeUnique<CPDF_DocRenderData>(this)) {}
CPDF_Document::~CPDF_Document() {
+ // Destroy the extension before doing any non-extension teardown.
+ m_pExtension.reset();
CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this);
}