Fix a double-free issue in CFX_PathData::~CFX_PathData
[pdfium.git] / fpdfsdk / src / fsdk_actionhandler.cpp
index 5ded984..518abd2 100644 (file)
@@ -12,7 +12,6 @@
 /* -------------------------- CBA_ActionHandler -------------------------- */
 
 CPDFSDK_ActionHandler::CPDFSDK_ActionHandler(CPDFDoc_Environment* pEvi) : 
-       m_pEvi(pEvi),
        m_pFormActionHandler(NULL),
        m_pMediaActionHandler(NULL)
 {
@@ -269,22 +268,16 @@ FX_BOOL   CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& acti
 
 FX_BOOL        CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict)
 {
-       ASSERT(m_pEvi != NULL);
-       ASSERT(pDocument != NULL);
-       ASSERT(pFieldDict != NULL);
+  ASSERT(pDocument != NULL);
+  ASSERT(pFieldDict != NULL);
 
-       if (1/*m_pApp->IsValidDocument(pDocument)*/)
-       {
-               CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm();
-               ASSERT(pInterForm != NULL);
+  CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm();
+  ASSERT(pInterForm != NULL);
 
-               CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm();
-               ASSERT(pPDFInterForm != NULL);
+  CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm();
+  ASSERT(pPDFInterForm != NULL);
 
-               return pPDFInterForm->GetFieldByDict(pFieldDict) != NULL;
-       }
-
-       return FALSE;
+  return pPDFInterForm->GetFieldByDict(pFieldDict) != NULL;
 }
 
 FX_BOOL        CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type,