mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Do not move NULL pointers in buflibmove_callback(). Fixes some skin crashes when changing themes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30610 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fe3eadffba
commit
117ebdb28c
1 changed files with 8 additions and 4 deletions
|
@ -93,7 +93,9 @@ static int buflibmove_callback(int handle, void* current, void* new)
|
|||
if (alloc->handle_locked)
|
||||
return BUFLIB_CB_CANNOT_MOVE;
|
||||
|
||||
if (alloc->font.bits)
|
||||
alloc->font.bits += diff;
|
||||
if (alloc->font.offset)
|
||||
alloc->font.offset += diff;
|
||||
if (alloc->font.width)
|
||||
alloc->font.width += diff;
|
||||
|
@ -102,7 +104,9 @@ static int buflibmove_callback(int handle, void* current, void* new)
|
|||
alloc->font.buffer_end += diff;
|
||||
alloc->font.buffer_position += diff;
|
||||
|
||||
if (alloc->font.cache._index)
|
||||
alloc->font.cache._index += diff;
|
||||
if (alloc->font.cache._lru._base)
|
||||
alloc->font.cache._lru._base += diff;
|
||||
|
||||
return BUFLIB_CB_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue