mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 21:52:28 -05:00
skin_engine: Fix crash on skin_reset (e.g. on language change).
Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
This commit is contained in:
parent
d475dd36a3
commit
be5fadff94
1 changed files with 2 additions and 1 deletions
|
|
@ -89,8 +89,9 @@ static void gui_skin_reset(struct gui_skin *skin)
|
||||||
skin->gui_wps.data = data = &skin->data;
|
skin->gui_wps.data = data = &skin->data;
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
struct skin_albumart *aa_save;
|
struct skin_albumart *aa_save;
|
||||||
|
unsigned char *buffer = get_skin_buffer(data);
|
||||||
/* copy to temp var to protect against memset */
|
/* 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;
|
short old_width, old_height;
|
||||||
old_width = aa_save->width;
|
old_width = aa_save->width;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue