mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
[BugFix] do_menu skinlist_draw dangling reference
skinlist_draw stores a pointer to the list supplied if this pointer goes out of scope we may try to access it toggle_theme has a path to handle this but if you move to a a item with the theme enabled it doesn't release the pointer later the pointer will be referenced long after it has gone out of scope limiting this to do_menu() if other areas are problematic the previous version of this patch applies it system-wide Change-Id: I57c73d789856cb1a660fb704f02ca55c8978a4d0
This commit is contained in:
parent
7a281eca83
commit
d8d6415505
1 changed files with 3 additions and 0 deletions
|
@ -769,7 +769,10 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
}
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
viewportmanager_theme_undo(i, false);
|
||||
skinlist_set_cfg(i, NULL); /* Bugfix dangling reference in skin_draw() */
|
||||
}
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
/* This is needed because this function runs the settings menu and we do
|
||||
* not want to switch back to the old mode if the user intentionally went
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue