From 1d0ef6335cf7f7f55def74ef7c1e0aa7978053e5 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 13 Dec 2004 22:17:43 +0000 Subject: [project @ 2004-12-13 22:17:43 by bursa] xcalloc/xrealloc/xstrdup-purge week, part 3. svn path=/import/netsurf/; revision=1403 --- render/html.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index 1b4cf093f..9b0bbf2ee 100644 --- a/render/html.c +++ b/render/html.c @@ -194,7 +194,6 @@ bool html_convert(struct content *c, int width, int height) LOG(("Parsing failed")); msg_data.error = messages_get("ParsingFail"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); - warn_user("ParsingFail", 0); return false; } /* Last change to pick the Content-Type charset information if the @@ -213,7 +212,6 @@ bool html_convert(struct content *c, int width, int height) xmlFreeDoc(document); msg_data.error = messages_get("ParsingFail"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); - warn_user("ParsingFail", 0); return false; } for (head = html->children; @@ -235,7 +233,11 @@ bool html_convert(struct content *c, int width, int height) LOG(("XML to box")); content_set_status(c, messages_get("Processing")); content_broadcast(c, CONTENT_MSG_STATUS, msg_data); - xml_to_box(html, c); + if (!xml_to_box(html, c)) { + msg_data.error = messages_get("NoMemory"); + content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + return false; + } /*box_dump(c->data.html.layout->children, 0);*/ /* extract image maps - can't do this sensibly in xml_to_box */ @@ -243,7 +245,6 @@ bool html_convert(struct content *c, int width, int height) LOG(("imagemap extraction failed")); msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); - warn_user("NoMemory", 0); return false; } /*imagemap_dump(c);*/ -- cgit v1.2.3