diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-14 11:31:14 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-14 11:31:14 +0000 |
commit | dfef7828d57e6e4988f2dac90ecf40293f7a8209 (patch) | |
tree | e2c5989a1029ee14fc8946412b987d98b0404d16 /src/parse/language.c | |
parent | b740ed09f1f1a9319a6ffa1d99d0dc8849f75173 (diff) | |
download | libcss-dfef7828d57e6e4988f2dac90ecf40293f7a8209.tar.gz libcss-dfef7828d57e6e4988f2dac90ecf40293f7a8209.tar.bz2 |
Assert that we've got a style once the property handler's returned CSS_OK.
svn path=/trunk/libcss/; revision=6479
Diffstat (limited to 'src/parse/language.c')
-rw-r--r-- | src/parse/language.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/parse/language.c b/src/parse/language.c index 364192a..01dd3fc 100644 --- a/src/parse/language.c +++ b/src/parse/language.c @@ -1049,15 +1049,13 @@ css_error parseProperty(css_language *c, const css_token *property, if (error != CSS_OK) return error; - /** \todo we should probably assert this, but until we've implemented - * all the property parsers, this will have to suffice. */ - if (style != NULL) { - /* Append style to rule */ - error = css_stylesheet_rule_append_style(c->sheet, rule, style); - if (error != CSS_OK) { - css_stylesheet_style_destroy(c->sheet, style); - return error; - } + assert (style != NULL); + + /* Append style to rule */ + error = css_stylesheet_rule_append_style(c->sheet, rule, style); + if (error != CSS_OK) { + css_stylesheet_style_destroy(c->sheet, style); + return error; } /* Style owned or destroyed by stylesheet, so forget about it */ |