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

Unified Diff: fpdfsdk/src/fpdfformfill.cpp

Issue 1425223002: XFA: Restore early return if no FPDF_Page in FORM_DoPageAAction() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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 | « 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/fpdfformfill.cpp
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index a493c7fe21b229c3cc500a5d64dd7577ab537906..435f645642d0ef94c613bf3bc7bbf595fc7186fd 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -660,20 +660,18 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page,
if (pPageView) {
CPDFDoc_Environment* pEnv = pSDKDoc->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
- CPDF_Dictionary* pPageDict = pPage->GetPDFPage()->m_pFormDict;
+ CPDF_Page* pPDFPage = pPage->GetPDFPage();
+ if (!pPDFPage)
+ return;
+ CPDF_Dictionary* pPageDict = pPDFPage->m_pFormDict;
CPDF_AAction aa = pPageDict->GetDict(FX_BSTRC("AA"));
-
- FX_BOOL bExistOAAction = FALSE;
Lei Zhang 2015/10/30 18:50:08 Remember to merge this to master.
Tom Sepez 2015/10/30 18:58:42 Acknowledged.
- FX_BOOL bExistCAAction = FALSE;
if (FPDFPAGE_AACTION_OPEN == aaType) {
- bExistOAAction = aa.ActionExist(CPDF_AAction::OpenPage);
- if (bExistOAAction) {
+ if (aa.ActionExist(CPDF_AAction::OpenPage)) {
CPDF_Action action = aa.GetAction(CPDF_AAction::OpenPage);
pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc);
}
} else {
- bExistCAAction = aa.ActionExist(CPDF_AAction::ClosePage);
- if (bExistCAAction) {
+ if (aa.ActionExist(CPDF_AAction::ClosePage)) {
CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage);
pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc);
}
« 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