From f74a1aab64410c567054b28a286ad1ef56f2ce7f Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 11 Nov 2010 09:57:37 +0000 Subject: Add a bit more debug output to checkwps git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28552 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_parser.c | 5 +++++ lib/skin_parser/skin_debug.c | 2 ++ 2 files changed, 7 insertions(+) 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 fd = open(img_path, O_RDONLY); if (fd < 0) + { + DEBUGF("Couldn't open %s\n", img_path); return false; + } size_t buf_size = read_bmp_fd(fd, bitmap, 0, format|FORMAT_RETURN_SIZE, NULL); char* imgbuf = (char*)skin_buffer_alloc(buf_size); if (!imgbuf) { + DEBUGF("Not enough skin buffer: need %ld more.\n", + buf_size - skin_buffer_freespace()); close(fd); return NULL; } 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() { int i; char text[128]; + if (!error_line_start) + return; char* line_end = strchr(error_line_start, '\n'); int len = MIN(line_end - error_line_start, 80); if (!line_end) -- cgit v1.2.3