From 6bf7e4a31886a65c70a0630382a5e5d141a49949 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 22 May 2005 12:44:44 +0000 Subject: [project @ 2005-05-22 12:44:44 by bursa] Fix crash when stylesheets fail to load. svn path=/import/netsurf/; revision=1730 --- render/html.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/render/html.c b/render/html.c index 93b986ba5..83ed33a9c 100644 --- a/render/html.c +++ b/render/html.c @@ -637,8 +637,9 @@ bool html_find_stylesheets(struct content *c, xmlNode *head) css_set_origin(c->data.html.stylesheet_content[ STYLESHEET_STYLE], CSS_ORIGIN_AUTHOR); for (i = STYLESHEET_START; i != c->data.html.stylesheet_count; i++) - css_set_origin(c->data.html.stylesheet_content[i], - CSS_ORIGIN_AUTHOR); + if (c->data.html.stylesheet_content[i]) + css_set_origin(c->data.html.stylesheet_content[i], + CSS_ORIGIN_AUTHOR); c->data.html.working_stylesheet = css_make_working_stylesheet( c->data.html.stylesheet_content, -- cgit v1.2.3