X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/211dfeddfca5c5992db510bdaa72226bf2013c05..6285be722384e07c2587e769dce7cabb8adbd31b:/src/html/htmltag.cpp diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index a422775025..4e042c993f 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -300,8 +300,14 @@ wxHtmlTag::wxHtmlTag(wxHtmlTag *parent, wxHtmlTag::~wxHtmlTag() { - for (wxHtmlTag *t = m_FirstChild; t; t = t->GetNextSibling()) - delete t; + wxHtmlTag *t1, *t2; + t1 = m_FirstChild; + while (t1) + { + t2 = t1->GetNextSibling(); + delete t1; + t1 = t2; + } } bool wxHtmlTag::HasParam(const wxString& par) const