diff options
-rw-r--r-- | src/cssparser.cc | 2 | ||||
-rw-r--r-- | src/styleengine.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc index 87718d31..bd5949bd 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -1186,7 +1186,7 @@ void a_Css_parse(CssContext * context, CssPropertyList *a_Css_parse_declaration(const char *buf, int buflen) { - CssPropertyList *props = new CssPropertyList (); + CssPropertyList *props = new CssPropertyList (true); CssParser parser; parser.context = NULL; diff --git a/src/styleengine.cc b/src/styleengine.cc index 015f75be..3f15c419 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -428,13 +428,13 @@ Style * StyleEngine::style0 (CssPropertyList *nonCssProperties) { // merge style information cssContext->apply (&props, this, styleAttributeProps, nonCssProperties); - if (styleAttributeProps) - delete styleAttributeProps; - // apply style apply (&attrs, &props); stack->getRef (stack->size () - 1)->style = Style::create (layout, &attrs); + + if (styleAttributeProps) + delete styleAttributeProps; return stack->getRef (stack->size () - 1)->style; } |