Index: fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp |
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp |
index 1b27e16551ad58cca44d16fa9466b7fbc2d17caf..fed54096246f4d2c1197f11e2e149ba564634624 100644 |
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp |
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp |
@@ -258,7 +258,11 @@ FX_BOOL CPDFXFA_DocEnvironment::PopupMenu(CXFA_FFWidget* hWidget, |
void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView, |
uint32_t dwFlags) { |
- CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); |
+ CPDFSDK_Document* pSDKDoc = m_pDocument->GetSDKDoc(); |
+ if (!pSDKDoc) |
+ return; |
+ |
+ CPDFSDK_Environment* pEnv = pSDKDoc->GetEnv(); |
if (!pEnv) |
return; |