]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlcell.cpp
Mac-ify wxTreeCtrl further.
[wxWidgets.git] / src / html / htmlcell.cpp
index 473eeca6006165d30a4b4aab767d1c6cfc3e3350..9e49b42543daf1f175244f49ade1540c15790896 100644 (file)
@@ -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;
     }
 }