summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-08-28 10:06:47 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2017-08-28 10:06:47 +0100
commit36c01fc03b0231ca61714c2610da233948a79bba (patch)
tree88ecf0e0b20154cd79c7419d8fb788170144bdfa /content/handlers
parentcde300133e95a8db0a925879f2c9d940f2bbebdc (diff)
downloadnetsurf-36c01fc03b0231ca61714c2610da233948a79bba.tar.gz
netsurf-36c01fc03b0231ca61714c2610da233948a79bba.tar.bz2
Sprite content handler: Convert to using content_broadcast_errorcode().
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/image/nssprite.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/content/handlers/image/nssprite.c b/content/handlers/image/nssprite.c
index ab48978e9..530c95385 100644
--- a/content/handlers/image/nssprite.c
+++ b/content/handlers/image/nssprite.c
@@ -95,7 +95,6 @@ static nserror nssprite_create(const content_handler *handler,
static bool nssprite_convert(struct content *c)
{
nssprite_content *nssprite = (nssprite_content *) c;
- union content_msg_data msg_data;
struct rosprite_mem_context* ctx;
@@ -118,14 +117,12 @@ static bool nssprite_convert(struct content *c)
nssprite->bitmap = guit->bitmap->create(sprite->width, sprite->height, BITMAP_NEW);
if (!nssprite->bitmap) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
+ content_broadcast_errorcode(c, NSERROR_NOMEM);
return false;
}
uint32_t* imagebuf = (uint32_t *)guit->bitmap->get_buffer(nssprite->bitmap);
if (!imagebuf) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
+ content_broadcast_errorcode(c, NSERROR_NOMEM);
return false;
}
unsigned char *spritebuf = (unsigned char *)sprite->image;