summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfformfill.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-28 11:08:51 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-28 11:08:51 -0700
commitd1a588c6ce03425773594381a0966434016813b1 (patch)
treea7f4a8c0f76087c540b18028c0a93ce5ddb311ea /fpdfsdk/src/fpdfformfill.cpp
parenta25b4bca69ab26d174edb8cefbdcfc1a0353915a (diff)
downloadpdfium-chromium/2473.tar.xz
The refactoring at fb07e28 removed a null handle check. BUG=514690 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1261923003 .
Diffstat (limited to 'fpdfsdk/src/fpdfformfill.cpp')
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index d21d5d209d..42e94c789d 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -27,6 +27,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((CPDF_Page*)page, TRUE) : nullptr;
}