forked from len0rd/rockbox
Fix tagtree from blowing up when its buffer moves
I noticed that after booting with the external storage removed, playing from tagtree, inserting the card, forcing dircache to reallocate from the debug screen, and trying to reenter tagtree, it would data abort because the dircache reallaction to a larger size caused the tagtree buffer to move. Adjustment to at least one pointer (csi) was missed. Since it's non-trivial there to determine when things should be NULL and when they shouldn't, add check for menu too before moving it. As for the rest, who knows. Change-Id: Iea6538a2091b4b47083f39296555efc47edf8ba8
This commit is contained in:
parent
f483a07950
commit
6436c6e749
1 changed files with 6 additions and 1 deletions
|
|
@ -201,7 +201,12 @@ static int move_callback(int handle, void* current, void* new)
|
|||
if (lock_count > 0)
|
||||
return BUFLIB_CB_CANNOT_MOVE;
|
||||
|
||||
UPDATE(menu, diff);
|
||||
if (menu)
|
||||
UPDATE(menu, diff);
|
||||
|
||||
if (csi)
|
||||
UPDATE(csi, diff);
|
||||
|
||||
/* loop over menus */
|
||||
for(int i = 0; i < menu_count; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue