summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_engine.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-06-20 07:14:14 +0200
committerThomas Martitz <kugel@rockbox.org>2013-06-23 20:55:46 +0200
commitbe5fadff942ad83aec9a73f34cf39f55bca13a80 (patch)
treeaee321296b8aa54761c9a5b15d107f107b589fc4 /apps/gui/skin_engine/skin_engine.c
parentd475dd36a3702231fc76ef4dfdf771acbc730423 (diff)
downloadrockbox-be5fadff942ad83aec9a73f34cf39f55bca13a80.tar.gz
rockbox-be5fadff942ad83aec9a73f34cf39f55bca13a80.zip
skin_engine: Fix crash on skin_reset (e.g. on language change).
Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
Diffstat (limited to 'apps/gui/skin_engine/skin_engine.c')
-rw-r--r--apps/gui/skin_engine/skin_engine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index 0b6f099b2b..fd8381edbd 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -89,8 +89,9 @@ static void gui_skin_reset(struct gui_skin *skin)
skin->gui_wps.data = data = &skin->data;
#ifdef HAVE_ALBUMART
struct skin_albumart *aa_save;
+ unsigned char *buffer = get_skin_buffer(data);
/* copy to temp var to protect against memset */
- if ((aa_save = SKINOFFSETTOPTR(get_skin_buffer(data), data->albumart)))
+ if (buffer && (aa_save = SKINOFFSETTOPTR(buffer, data->albumart)))
{
short old_width, old_height;
old_width = aa_save->width;