]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlpars.cpp
added wxTreeEvent::GetKeyEvent() to allow to retrieve the key event flags from EVT_TR...
[wxWidgets.git] / src / html / htmlpars.cpp
index 57a7406d032463b5e827531475c00ff58fc023db..cf6897d33580cc372d237a006c45c7a7825f4f4c 100644 (file)
@@ -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;