X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf7d7ee7062f7f6028df40e43745235658e38b4d..acc0ebd7a871124d4d6b36069340227e6c584f38:/src/html/htmlcell.cpp 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; } }