changeset 995:ec699776ee0c

clear DilloHtmlState stack on destruction
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Wed, 11 Mar 2009 11:09:44 +0100
parents 7fbd059a5164
children 2ed439264264
files src/html.cc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Tue Mar 10 17:19:45 2009 +0000
+++ b/src/html.cc	Wed Mar 11 11:09:44 2009 +0100
@@ -489,8 +489,6 @@
    /* Create the main widget */
    dw = stack->getRef(0)->textblock = new Textblock (prefs.limit_text_width);
 
-   stack->getRef(0)->table_cell_props = NULL;
-
    /* Handle it when the user clicks on a link */
    connectSignals(dw);
 
@@ -605,6 +603,9 @@
  */
 void DilloHtml::freeParseData()
 {
+   for (int i = stack->size () - 1; i >= 0; i--)
+      if (stack->getRef (i)->table_cell_props)
+         stack->getRef (i)->table_cell_props->unref ();
    delete(stack);
 
    dStr_free(Stash, TRUE);