aboutsummaryrefslogtreecommitdiff
path: root/src/cssparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cssparser.cc')
-rw-r--r--src/cssparser.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 07ab3ac1..6bf7567e 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -893,6 +893,7 @@ static void Css_parse_ruleset (CssParser *parser)
}
if (selector) {
+ selector->ref ();
selector->id = selector->klass = selector->pseudo = NULL;
do {
@@ -962,7 +963,9 @@ static void Css_parse_ruleset (CssParser *parser)
DEBUG_MSG (DEBUG_PARSE_LEVEL, "end of %s\n", "selectors");
props = new CssPropertyList ();
+ props->ref ();
importantProps = new CssPropertyList ();
+ importantProps->ref ();
/* Read block. ('{' has already been read.) */
if (parser->ttype != CSS_TK_END) {
@@ -987,8 +990,13 @@ static void Css_parse_ruleset (CssParser *parser)
parser->context->addRule (new CssRule (s, props), CSS_PRIMARY_AUTHOR);
parser->context->addRule (new CssRule (s, importantProps), CSS_PRIMARY_AUTHOR_IMPORTANT);
}
+
+ s->unref ();
}
+ props->unref ();
+ importantProps->unref ();
+
delete list;
if (parser->ttype == CSS_TK_CHAR && parser->tval[0] == '}')