mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-17 15:04:18 +03:00
Remove erroneous assertion: there may be no bitmap object if there was no PNG data.
svn path=/trunk/netsurf/; revision=10540
This commit is contained in:
parent
227780f653
commit
48ba03d6ca
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user