]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just slightly simplify code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 28 Aug 2009 10:43:51 +0000 (10:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 28 Aug 2009 10:43:51 +0000 (10:43 +0000)
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

index f62f6a9353605f5871f5ec881de189c38994db82..8fedf6c9992b44812f81037e31d592039e661525 100644 (file)
@@ -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);