X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f23e92e72ae94e775a9931ba3a9f40cbdf774c71..b09bda689c8525886d217a9b171b354391cd6d78:/src/html/htmlpars.cpp diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 57a7406d03..cf6897d335 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -80,8 +80,9 @@ wxHtmlParser::wxHtmlParser() wxHtmlParser::~wxHtmlParser() { - while (RestoreState()) - DestroyDOMTree(); + while (RestoreState()) {} + DestroyDOMTree(); + delete m_HandlersStack; m_HandlersHash.Clear(); m_HandlersList.DeleteContents(TRUE); @@ -386,6 +387,8 @@ bool wxHtmlParser::RestoreState() { if (!m_SavedStates) return FALSE; + DestroyDOMTree(); + wxHtmlParserState *s = m_SavedStates; m_SavedStates = s->m_nextState;