From c7520629b0d655bde1db9cbe0012f91502265b5d Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 16 Jul 2003 17:38:46 +0000 Subject: [project @ 2003-07-16 17:38:46 by bursa] Make fetchcache return 0 on failure to parse URL. svn path=/import/netsurf/; revision=225 --- css/css.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'css/css.c') diff --git a/css/css.c b/css/css.c index 8a29abb85..c894f6678 100644 --- a/css/css.c +++ b/css/css.c @@ -147,6 +147,8 @@ void css_revive(struct content *c, unsigned int width, unsigned int height) c->data.css.import_url[i], c->url, css_atimport_callback, c, i, c->width, c->height); + if (c->data.css.import_content[i] == 0) + continue; if (c->data.css.import_content[i]->status != CONTENT_STATUS_DONE) c->active++; } @@ -296,7 +298,8 @@ void css_atimport(struct content *c, struct node *node) c->data.css.import_content[i] = fetchcache( c->data.css.import_url[i], c->url, css_atimport_callback, c, i, c->width, c->height); - if (c->data.css.import_content[i]->status != CONTENT_STATUS_DONE) + if (c->data.css.import_content[i] && + c->data.css.import_content[i]->status != CONTENT_STATUS_DONE) c->active++; free(url); @@ -343,7 +346,8 @@ void css_atimport_callback(content_msg msg, struct content *css, c->data.css.import_content[i] = fetchcache( c->data.css.import_url[i], c->url, css_atimport_callback, c, i, css->width, css->height); - if (c->data.css.import_content[i]->status != CONTENT_STATUS_DONE) + if (c->data.css.import_content[i] && + c->data.css.import_content[i]->status != CONTENT_STATUS_DONE) c->active++; break; -- cgit v1.2.3