diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-28 11:23:22 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-28 11:23:22 -0700 |
commit | 0b133988474ad5682db606e3aa9f0722e82eaa32 (patch) | |
tree | b9e68923e534100be762f38e3a6ff2c8d4434074 /fpdfsdk/src/fpdfformfill.cpp | |
parent | d191c3a7f43272019d166bb1fa040eca60650e7d (diff) | |
download | pdfium-0b133988474ad5682db606e3aa9f0722e82eaa32.tar.xz |
Merge to XFA: Fix segv above CPDFSDK_Document::GetPageView()
Original Review URL: https://codereview.chromium.org/1261923003 .
(cherry picked from commit d1a588c6ce03425773594381a0966434016813b1)
BUG=514690
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254383007 .
Diffstat (limited to 'fpdfsdk/src/fpdfformfill.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfformfill.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp index 20beedd84a..aa1c04a5c4 100644 --- a/fpdfsdk/src/fpdfformfill.cpp +++ b/fpdfsdk/src/fpdfformfill.cpp @@ -31,6 +31,9 @@ CPDFSDK_InterForm* FormHandleToInterForm(FPDF_FORMHANDLE hHandle) CPDFSDK_PageView* FormHandleToPageView(FPDF_FORMHANDLE hHandle, FPDF_PAGE page) { + if (!page) + return nullptr; + CPDFSDK_Document* pSDKDoc = FormHandleToSDKDoc(hHandle); return pSDKDoc ? pSDKDoc->GetPageView((CPDFXFA_Page*)page, TRUE) : nullptr; } |