summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 7bcd25d258..a1cc40ff6e 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1856,8 +1856,14 @@ static int load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char*
return fd;
}
#ifndef __PCTOOL__
- size_t buf_size = read_bmp_fd(fd, bitmap, 0,
- format|FORMAT_RETURN_SIZE, NULL);
+ int buf_size = read_bmp_fd(fd, bitmap, 0,
+ format|FORMAT_RETURN_SIZE, NULL);
+ if(buf_size < 0)
+ {
+ close(fd);
+ return buf_size;
+ }
+
handle = core_alloc_ex(bitmap->data, buf_size, &buflib_ops);
if (handle <= 0)
{