mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
skin parser: Fix crash that can occur when same bmp is loaded multiple times
img may have already been loaded, in which case bm.data will intentionally have been set to NULL (see NOTE in load_skin_bmp) Also see commit01cbb79
and previous fix35f9a5b
Change-Id: I581ed63836f30a6b669b3d1fd5886fc1b3664386
This commit is contained in:
parent
8e2b11cd3c
commit
cb7b6fd572
1 changed files with 1 additions and 1 deletions
|
@ -2041,7 +2041,7 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir)
|
|||
token = SKINOFFSETTOPTR(skin_buffer, imglist->token);
|
||||
if (token) {
|
||||
img = (struct gui_img*)SKINOFFSETTOPTR(skin_buffer, token->value.data);
|
||||
if (img && !strcmp(path, img->bm.data))
|
||||
if (img && img->bm.data && !strcmp(path, img->bm.data))
|
||||
{
|
||||
img->loaded = true;
|
||||
img->buflib_handle = handle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue