Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp

Issue 1192743004: Cleanup: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 784fc0169ec5365739ef3c1e4d4e034454e37f8b..2db8d6095f9399ca838091cd4e1e20a4cea5746e 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -1044,9 +1044,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert)
}
}
}
- if (pEncoding) {
- delete pEncoding;
- }
+ delete pEncoding;
pFontDesc->SetAtInteger("StemV", nStemV);
AddIndirectObject(pFontDesc);
pFontDict->SetAtReference("FontDescriptor", this, pFontDesc);
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698