summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-07-01 15:56:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-07-01 15:56:45 +0000
commit2606d65d5bd1e6aa137f002effcae32b0eed9ee6 (patch)
tree1865ba8ea9884b07b1bff50779499d734b2fe18c /src
parent46dd17bc8c6dcc1cddf3c8c07644c319ef1f8b03 (diff)
downloadlibcss-2606d65d5bd1e6aa137f002effcae32b0eed9ee6.tar.gz
libcss-2606d65d5bd1e6aa137f002effcae32b0eed9ee6.tar.bz2
Blank inline styles, or inline styles that only contain invalid data will have no bytecode. This is perfectly legitimate, so should not result in an error.
svn path=/trunk/libcss/; revision=8243
Diffstat (limited to 'src')
-rw-r--r--src/select/select.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/select/select.c b/src/select/select.c
index c0dfd1f..7f18aff 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -307,15 +307,16 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
/* Sanity check style */
if (inline_style->rule_count != 1 ||
inline_style->rule_list->type != CSS_RULE_SELECTOR ||
- inline_style->rule_list->items != 0 ||
- sel->style == NULL) {
+ inline_style->rule_list->items != 0) {
error = CSS_INVALID;
goto cleanup;
}
- error = cascade_style(sel->style, &state);
- if (error != CSS_OK)
- goto cleanup;
+ if (sel->style != NULL) {
+ error = cascade_style(sel->style, &state);
+ if (error != CSS_OK)
+ goto cleanup;
+ }
}
/* Take account of presentational hints */