From 83346830688525a287489cc791299cbc945d4fc4 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 2 Jan 2005 03:58:21 +0000 Subject: [project @ 2005-01-02 03:58:20 by jmb] xcalloc/xrealloc/xstrdup-purge - Lose remaining calls (and purge the relevant functions from utils.c) svn path=/import/netsurf/; revision=1419 --- render/html.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index 33b2a96c2..6d934e22e 100644 --- a/render/html.c +++ b/render/html.c @@ -592,9 +592,13 @@ bool html_find_stylesheets(struct content *c, xmlNode *head) if (c->data.html.stylesheet_content[STYLESHEET_STYLE] != 0) { if (css_convert(c->data.html.stylesheet_content[STYLESHEET_STYLE], c->width, c->height)) { - content_add_user(c->data.html.stylesheet_content[STYLESHEET_STYLE], + if (!content_add_user(c->data.html.stylesheet_content[STYLESHEET_STYLE], html_convert_css_callback, - c, (void *) STYLESHEET_STYLE); + c, (void *) STYLESHEET_STYLE)) { + /* no memory */ + c->data.html.stylesheet_content[STYLESHEET_STYLE] = 0; + return false; + } } else { /* conversion failed */ c->data.html.stylesheet_content[STYLESHEET_STYLE] = 0; -- cgit v1.2.3