diff options
author | James Bursa <james@netsurf-browser.org> | 2004-12-13 22:17:43 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-12-13 22:17:43 +0000 |
commit | 1d0ef6335cf7f7f55def74ef7c1e0aa7978053e5 (patch) | |
tree | 9c8a99bcbbe68abdc47310e3fda3f9c0762ddfe7 /render/html.c | |
parent | 57fbde93e6b599af555e376ee1124fdf74b1a8a6 (diff) | |
download | netsurf-1d0ef6335cf7f7f55def74ef7c1e0aa7978053e5.tar.gz netsurf-1d0ef6335cf7f7f55def74ef7c1e0aa7978053e5.tar.bz2 |
[project @ 2004-12-13 22:17:43 by bursa]
xcalloc/xrealloc/xstrdup-purge week, part 3.
svn path=/import/netsurf/; revision=1403
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 9 |
1 files changed, 5 insertions, 4 deletions
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);*/ |