From 1c51fc784d3036f5ca3830141f8eee56934f44b7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 28 Aug 2009 10:43:51 +0000 Subject: [PATCH] No real changes, just slightly simplify code. No need to check whether the pointer is NULL before deleting it nor to assign NULL to it if it's going to be immediately reassigned on the next line. Closes #11149. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlwin.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index f62f6a9353..8fedf6c999 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -467,11 +467,8 @@ bool wxHtmlWindow::DoSetPage(const wxString& source) SetBackgroundImage(wxNullBitmap); m_Parser->SetDC(dc); - if (m_Cell) - { - delete m_Cell; - m_Cell = NULL; - } + + delete m_Cell; m_Cell = (wxHtmlContainerCell*) m_Parser->Parse(newsrc); delete dc; m_Cell->SetIndent(m_Borders, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS); -- 2.45.2