summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_dataavail.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-19 17:26:17 -0700
committerLei Zhang <thestig@chromium.org>2015-06-19 17:26:17 -0700
commit6d8b1c2c7b1cbada20109f70ae971a4192330bb5 (patch)
treee755b7cb2624622cba606134493d25fb7f1ce6c8 /fpdfsdk/src/fpdf_dataavail.cpp
parent9883a7da2d4f31910073c03e703d5b97a45d9254 (diff)
downloadpdfium-6d8b1c2c7b1cbada20109f70ae971a4192330bb5.tar.xz
Merge to XFA: Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004. (cherry picked from commit cfac954abcab7caf47d3fa3d641c553cba998271) Review URL: https://codereview.chromium.org/1196783003.
Diffstat (limited to 'fpdfsdk/src/fpdf_dataavail.cpp')
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index 7189dc0788..2121f2678a 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -90,7 +90,7 @@ public:
~CFPDF_DataAvail()
{
- if (m_pDataAvail) delete m_pDataAvail;
+ delete m_pDataAvail;
}
IPDF_DataAvail* m_pDataAvail;
@@ -109,8 +109,7 @@ DLLEXPORT FPDF_AVAIL STDCALL FPDFAvail_Create(FX_FILEAVAIL* file_avail, FPDF_FIL
DLLEXPORT void STDCALL FPDFAvail_Destroy(FPDF_AVAIL avail)
{
- if (avail == NULL) return;
- delete (CFPDF_DataAvail*)avail;
+ delete (CFPDF_DataAvail*)avail;
}
DLLEXPORT int STDCALL FPDFAvail_IsDocAvail(FPDF_AVAIL avail, FX_DOWNLOADHINTS* hints)