Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3039)

Unified Diff: core/fpdfapi/parser/cpdf_document.cpp

Issue 2437773003: Fix loading page using hint tables. (Closed)
Patch Set: fix test. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/parser/cpdf_document_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_document.cpp
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index c5f64a790ca1d31f6cb4357f5a01b18d6b0585e1..5f64c14d3113de5de19ae353b0adb5649be290a9 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -425,7 +425,9 @@ CPDF_Document::CPDF_Document(std::unique_ptr<CPDF_Parser> pParser)
CPDF_Document::~CPDF_Document() {
delete m_pDocPage;
- CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this);
+ if (CPDF_ModuleMgr::Get()->GetPageModule()) {
Lei Zhang 2016/10/20 21:18:43 Is this to work around the crash in the unit test?
Lei Zhang 2016/10/20 21:43:36 See fpdfsdk/fpdfdoc_unittest.cpp for an example of
+ CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this);
+ }
m_pByteStringPool.DeleteObject(); // Make weak.
}
« no previous file with comments | « core/fpdfapi/parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/parser/cpdf_document_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698