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

Unified Diff: core/src/fxge/ge/fx_ge.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/fxge/dib/fx_dib_main.cpp ('k') | core/src/fxge/ge/fx_ge_device.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge.cpp
diff --git a/core/src/fxge/ge/fx_ge.cpp b/core/src/fxge/ge/fx_ge.cpp
index 5198a042e8fddb09b59e4de93c07966319f6429d..4b34a079e5ecd4270221435532dfb797b174e2e8 100644
--- a/core/src/fxge/ge/fx_ge.cpp
+++ b/core/src/fxge/ge/fx_ge.cpp
@@ -17,13 +17,9 @@ CFX_GEModule::CFX_GEModule()
}
CFX_GEModule::~CFX_GEModule()
{
- if (m_pFontCache) {
- delete m_pFontCache;
- }
+ delete m_pFontCache;
m_pFontCache = NULL;
- if (m_pFontMgr) {
- delete m_pFontMgr;
- }
+ delete m_pFontMgr;
m_pFontMgr = NULL;
DestroyPlatform();
}
@@ -44,9 +40,7 @@ void CFX_GEModule::Use(CFX_GEModule* pModule)
}
void CFX_GEModule::Destroy()
{
- if (g_pGEModule) {
- delete g_pGEModule;
- }
+ delete g_pGEModule;
g_pGEModule = NULL;
}
CFX_FontCache* CFX_GEModule::GetFontCache()
« no previous file with comments | « core/src/fxge/dib/fx_dib_main.cpp ('k') | core/src/fxge/ge/fx_ge_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698