diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-19 14:51:10 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-19 14:51:10 -0700 |
commit | cfac954abcab7caf47d3fa3d641c553cba998271 (patch) | |
tree | 4cd546a2377e973fec54b75c1002c8c0ff321e8f /fpdfsdk/src/fpdf_dataavail.cpp | |
parent | df558514bf5cb5750d5a7000a843f45f4170d5a4 (diff) | |
download | pdfium-cfac954abcab7caf47d3fa3d641c553cba998271.tar.xz |
Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1192743004.
Diffstat (limited to 'fpdfsdk/src/fpdf_dataavail.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_dataavail.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp index b6363a8827..b26d2af10a 100644 --- a/fpdfsdk/src/fpdf_dataavail.cpp +++ b/fpdfsdk/src/fpdf_dataavail.cpp @@ -87,7 +87,7 @@ public: ~CFPDF_DataAvail() { - if (m_pDataAvail) delete m_pDataAvail; + delete m_pDataAvail; } IPDF_DataAvail* m_pDataAvail; @@ -106,8 +106,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) |