diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-17 21:41:31 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-17 21:41:31 +0200 |
commit | 6c7f9bd1398482e9098c8495dc2c5f13e771a865 (patch) | |
tree | 6caba1be99b927c1a6b93f09004d9a7bf44c18d4 /src/styleengine.cc | |
parent | 9a737b2257fe22826095ea02c4db49f86447c0d1 (diff) |
fix another Style leak in StyleEngine
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 540e9d06..62ba60d7 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -59,6 +59,14 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) { StyleEngine::~StyleEngine () { while (doctree->top ()) endElement (doctree->top ()->element); + assert (stack->size () == 1); // dummy node on the bottom of the stack + Node *n = stack->getRef (stack->size () - 1); + if (n->style) + n->style->unref (); + if (n->wordStyle) + n->wordStyle->unref (); + if (n->backgroundStyle) + n->backgroundStyle->unref (); delete stack; delete doctree; delete cssContext; |