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

Unified Diff: fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp

Issue 928803002: Set the view pointer as NULL after its xfa doc is released (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index d8c08cc2a5c549ffeb6a2ec7fd996c920d348fd1..8a7db3f8586f2be91dfbbbd42b56270b1382be6c 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -81,6 +81,7 @@ CPDFXFA_Document::~CPDFXFA_Document()
pDocHandler->CloseDoc(m_pXFADoc);
Tom Sepez 2015/02/17 19:14:08 nit: can we make a helper method to do these 4 ste
pDocHandler->ReleaseDoc(m_pXFADoc);
m_pXFADoc = NULL;
+ m_pXFADocView = NULL;
}
}
}
@@ -132,6 +133,7 @@ FX_BOOL CPDFXFA_Document::LoadXFADoc()
pDocHandler->CloseDoc(m_pXFADoc);
pDocHandler->ReleaseDoc(m_pXFADoc);
m_pXFADoc = NULL;
+ m_pXFADocView = NULL;
SetLastError(FPDF_ERR_XFALOAD);
return FALSE;
@@ -152,6 +154,7 @@ FX_BOOL CPDFXFA_Document::LoadXFADoc()
pDocHandler->CloseDoc(m_pXFADoc);
pDocHandler->ReleaseDoc(m_pXFADoc);
m_pXFADoc = NULL;
+ m_pXFADocView = NULL;
SetLastError(FPDF_ERR_XFALAYOUT);
return FALSE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698