diff options
author | Adrian Lees <adrian@aemulor.com> | 2006-03-22 03:56:44 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2006-03-22 03:56:44 +0000 |
commit | 99c1bfc195dd4720514d3662d3596b80bf58525a (patch) | |
tree | e5c5faf503ef0ca67b5997b5ce62043a34127c12 | |
parent | 190672dc9860975ca2ca106dd4372336d540a989 (diff) | |
download | netsurf-99c1bfc195dd4720514d3662d3596b80bf58525a.tar.gz netsurf-99c1bfc195dd4720514d3662d3596b80bf58525a.tar.bz2 |
[project @ 2006-03-22 03:56:44 by adrianl]
Prevent access to non-existent base stylesheet if it fails to load
svn path=/import/netsurf/; revision=2149
-rw-r--r-- | render/html.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/render/html.c b/render/html.c index f7369c160..d6a4eff41 100644 --- a/render/html.c +++ b/render/html.c @@ -744,7 +744,10 @@ bool html_find_stylesheets(struct content *c, xmlNode *head) /* content_broadcast(c, CONTENT_MSG_STATUS, msg_data); */ /* } */ - css_set_origin(c->data.html.stylesheet_content[STYLESHEET_BASE], + /* any of our stylesheets pointers could be NULL at this point if the + CSS file(s) failed to load/fetch */ + if (c->data.html.stylesheet_content[STYLESHEET_BASE]) + css_set_origin(c->data.html.stylesheet_content[STYLESHEET_BASE], CSS_ORIGIN_UA); if (c->data.html.stylesheet_content[STYLESHEET_ADBLOCK]) css_set_origin(c->data.html.stylesheet_content[ |