summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_formfill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_formfill.cpp')
-rw-r--r--fpdfsdk/fpdf_formfill.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 0124124ff6..62d2c00d55 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -182,13 +182,14 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View));
#ifdef PDF_ENABLE_XFA
- if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true))
- pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, rect);
+ CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true);
#else // PDF_ENABLE_XFA
- if (CPDFSDK_PageView* pPageView =
- FormHandleToPageView(hHandle, FPDFPageFromUnderlying(pPage)))
- pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options);
+ CPDFSDK_PageView* pPageView =
+ FormHandleToPageView(hHandle, FPDFPageFromUnderlying(pPage));
#endif // PDF_ENABLE_XFA
+
+ if (pPageView)
+ pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, rect);
}
#ifdef _SKIA_SUPPORT_PATHS_
pDevice->Flush(true);