From: Vadim Zeitlin Date: Sat, 14 Jul 2001 02:02:09 +0000 (+0000) Subject: fixed crash in ~wxHtmlCell X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/491c9920d02e7a0ea99b129a76aa0cd6ec195b69 fixed crash in ~wxHtmlCell git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 473eeca600..9e49b42543 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -147,10 +147,12 @@ wxHtmlContainerCell::wxHtmlContainerCell(wxHtmlContainerCell *parent) : wxHtmlCe wxHtmlContainerCell::~wxHtmlContainerCell() { - if (m_Cells) + wxHtmlCell *cell = m_Cells; + while ( cell ) { - for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext()) - delete cell; + wxHtmlCell *cellNext = cell->GetNext(); + delete cell; + cell = cellNext; } }