diff options
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 5 | ||||
-rw-r--r-- | lib/skin_parser/skin_debug.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index ad3e7e48ce..a0466a8dbd 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -1115,12 +1115,17 @@ static bool load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char | |||
1115 | 1115 | ||
1116 | fd = open(img_path, O_RDONLY); | 1116 | fd = open(img_path, O_RDONLY); |
1117 | if (fd < 0) | 1117 | if (fd < 0) |
1118 | { | ||
1119 | DEBUGF("Couldn't open %s\n", img_path); | ||
1118 | return false; | 1120 | return false; |
1121 | } | ||
1119 | size_t buf_size = read_bmp_fd(fd, bitmap, 0, | 1122 | size_t buf_size = read_bmp_fd(fd, bitmap, 0, |
1120 | format|FORMAT_RETURN_SIZE, NULL); | 1123 | format|FORMAT_RETURN_SIZE, NULL); |
1121 | char* imgbuf = (char*)skin_buffer_alloc(buf_size); | 1124 | char* imgbuf = (char*)skin_buffer_alloc(buf_size); |
1122 | if (!imgbuf) | 1125 | if (!imgbuf) |
1123 | { | 1126 | { |
1127 | DEBUGF("Not enough skin buffer: need %ld more.\n", | ||
1128 | buf_size - skin_buffer_freespace()); | ||
1124 | close(fd); | 1129 | close(fd); |
1125 | return NULL; | 1130 | return NULL; |
1126 | } | 1131 | } |
diff --git a/lib/skin_parser/skin_debug.c b/lib/skin_parser/skin_debug.c index a09cd673c7..ce5af7d0c9 100644 --- a/lib/skin_parser/skin_debug.c +++ b/lib/skin_parser/skin_debug.c | |||
@@ -296,6 +296,8 @@ void skin_error_format_message() | |||
296 | { | 296 | { |
297 | int i; | 297 | int i; |
298 | char text[128]; | 298 | char text[128]; |
299 | if (!error_line_start) | ||
300 | return; | ||
299 | char* line_end = strchr(error_line_start, '\n'); | 301 | char* line_end = strchr(error_line_start, '\n'); |
300 | int len = MIN(line_end - error_line_start, 80); | 302 | int len = MIN(line_end - error_line_start, 80); |
301 | if (!line_end) | 303 | if (!line_end) |