From 48ba03d6ca518592ca02a3a72debbbb33e86cc11 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 1 May 2010 11:36:44 +0000 Subject: Remove erroneous assertion: there may be no bitmap object if there was no PNG data. svn path=/trunk/netsurf/; revision=10540 --- image/png.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'image') diff --git a/image/png.c b/image/png.c index 5f01b2387..fc6e745a6 100644 --- a/image/png.c +++ b/image/png.c @@ -267,6 +267,15 @@ bool nspng_convert(struct content *c) assert(c->data.png.png != NULL); assert(c->data.png.info != NULL); + if (c->data.png.bitmap == NULL) { + union content_msg_data msg_data; + + msg_data.error = messages_get("PNGError"); + content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + c->status = CONTENT_STATUS_ERROR; + return false; + } + data = content__get_source_data(c, &size); png_destroy_read_struct(&c->data.png.png, &c->data.png.info, 0); -- cgit v1.2.3