Chromium Code Reviews| Index: core/fpdfapi/fpdf_page/cpdf_image.cpp |
| diff --git a/core/fpdfapi/fpdf_page/cpdf_image.cpp b/core/fpdfapi/fpdf_page/cpdf_image.cpp |
| index 21cec2e442207e8cb188d1ac18b4f39c94d0846b..4fe23fa0bb9ab8217e139729ab68ca3d717d7521 100644 |
| --- a/core/fpdfapi/fpdf_page/cpdf_image.cpp |
| +++ b/core/fpdfapi/fpdf_page/cpdf_image.cpp |
| @@ -55,10 +55,8 @@ CPDF_Image::CPDF_Image(CPDF_Document* pDoc, CPDF_Stream* pStream, bool bInline) |
| CPDF_Image::~CPDF_Image() { |
| if (m_bInline) { |
| - if (m_pStream) |
| - m_pStream->Release(); |
| - if (m_pInlineDict) |
| - m_pInlineDict->Release(); |
| + delete m_pStream; |
| + delete m_pInlineDict; |
| } |
| } |
| @@ -289,7 +287,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress) { |
| pNewBitmap->ConvertFormat(FXDIB_Rgb); |
| SetImage(pNewBitmap, iCompress); |
| if (pDict) { |
|
Lei Zhang
2016/10/03 21:50:47
no if?
Tom Sepez
2016/10/05 21:03:02
Done.
|
| - pDict->Release(); |
| + delete pDict; |
| pDict = nullptr; |
| } |
| FX_Free(dest_buf); |