summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2005-01-25 21:42:37 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2005-01-25 21:42:37 +0000
commitcba69ab08367be9555fac10ead26996bdffb2d3e (patch)
tree53c987099a9da4c00acae0849601d82d79990d65
parent04f0525fbf8e6a35654d31dff0fa5fc98e5f5102 (diff)
downloadnetsurf-cba69ab08367be9555fac10ead26996bdffb2d3e.tar.gz
netsurf-cba69ab08367be9555fac10ead26996bdffb2d3e.tar.bz2
[project @ 2005-01-25 21:42:37 by jmb]
Ensure bitmap has been created. svn path=/import/netsurf/; revision=1468
-rw-r--r--image/mng.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/image/mng.c b/image/mng.c
index 63a0d6a22..af65c8a1d 100644
--- a/image/mng.c
+++ b/image/mng.c
@@ -186,6 +186,8 @@ mng_bool nsmng_processheader(mng_handle mng, mng_uint32 width, mng_uint32 height
c = (struct content *)mng_get_userdata(mng);
assert(c != NULL);
+ LOG(("processing header (%p) %d, %d", c, width, height));
+
c->bitmap = bitmap_create(width, height);
if (!c->bitmap) {
msg_data.error = messages_get("NoMemory");
@@ -252,7 +254,13 @@ bool nsmng_convert(struct content *c, int width, int height) {
assert(c != NULL);
- LOG(("Converting"));
+ LOG(("Converting %p '%s'", c, c->url));
+
+ /* by this point, the png should have been parsed
+ * and the bitmap created, so ensure that's the case
+ */
+ if (!c->bitmap)
+ return nsmng_broadcast_error(c);
/* Set the title
*/