summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render/html.c5
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[