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

Unified Diff: xfa/fxgraphics/cagg_graphics.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: 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
Index: xfa/fxgraphics/cagg_graphics.cpp
diff --git a/xfa/fxgraphics/cagg_graphics.cpp b/xfa/fxgraphics/cagg_graphics.cpp
index 4c9e41fea3c6c7eec3eb66b5d4119f3eb9a6c0df..a4211810c40371edf0ce6079426e21f75944b9de 100644
--- a/xfa/fxgraphics/cagg_graphics.cpp
+++ b/xfa/fxgraphics/cagg_graphics.cpp
@@ -26,7 +26,5 @@ FX_ERR CAGG_Graphics::Create(CFX_Graphics* owner,
}
CAGG_Graphics::~CAGG_Graphics() {
- if (m_owner->m_renderDevice)
- delete (CFX_FxgeDevice*)m_owner->m_renderDevice;
- m_owner = nullptr;
+ delete m_owner->m_renderDevice;
Tom Sepez 2016/04/28 21:47:22 virtual dtor?
Lei Zhang 2016/04/28 22:31:10 Yes.
}

Powered by Google App Engine
This is Rietveld 408576698