Cleanup: Do not check pointers before deleting them.
[pdfium.git] / core / src / fpdfapi / fpdf_page / fpdf_page_image.cpp
index 5d24ab7..aabfd14 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2014 PDFium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
+
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
 #include "../../../include/fpdfapi/fpdf_page.h"
@@ -54,7 +54,7 @@ CPDF_Image* CPDF_Image::Clone()
     if (m_pStream->GetObjNum()) {
         return m_pDocument->GetPageData()->GetImage(m_pStream);
     }
-    CPDF_Image* pImage = FX_NEW CPDF_Image(m_pDocument);
+    CPDF_Image* pImage = new CPDF_Image(m_pDocument);
     pImage->LoadImageF((CPDF_Stream*)((CPDF_Object*)m_pStream)->Clone(), m_bInline);
     if (m_bInline) {
         CPDF_Dictionary *pInlineDict = (CPDF_Dictionary*)m_pInlineDict->Clone(TRUE);