X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/211dfeddfca5c5992db510bdaa72226bf2013c05..018e2f1300b726936e8afa41fcc3e2a85d2ed456:/src/html/htmltag.cpp diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index a422775025..e725a033ab 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -26,6 +26,7 @@ #include "wx/html/htmltag.h" #include "wx/html/htmlpars.h" +#include "wx/colour.h" #include // for vsscanf #include @@ -300,8 +301,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 @@ -369,8 +376,9 @@ bool wxHtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const HTML_COLOUR("teal", 0x00,0x80,0x80) HTML_COLOUR("aqua", 0x00,0xFF,0xFF) #undef HTML_COLOUR - return FALSE; } + + return FALSE; } bool wxHtmlTag::GetParamAsInt(const wxString& par, int *clr) const