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

Unified Diff: xfa/fde/fde_render.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 8 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 | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fee/fde_txtedtengine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/fde_render.cpp
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 81e5b1b25925f52d91a28ba813f9d40635217c87..7c989a0c6b02e11306e80925ba2de0beff8321ed 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -105,10 +105,8 @@ void CFDE_RenderContext::StopRender() {
m_pIterator->Release();
m_pIterator = nullptr;
}
- if (m_pBrush) {
- delete m_pBrush;
- m_pBrush = nullptr;
- }
+ delete m_pBrush;
+ m_pBrush = nullptr;
FX_Free(m_pCharPos);
m_pCharPos = nullptr;
m_iCharPosCount = 0;
« no previous file with comments | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fee/fde_txtedtengine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698