forked from len0rd/rockbox
Make skinned lists handle the "0 items" case without crashing
Change-Id: Iaf69c93727e0f0e2a48b44c330883f7a620c4d99
This commit is contained in:
parent
9c21258e2c
commit
1a4da5961e
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ static int current_drawing_line;
|
|||
static int offset_to_item(int offset, bool wrap)
|
||||
{
|
||||
int item = current_drawing_line + offset;
|
||||
if (!current_list)
|
||||
if (!current_list || current_list->nb_items == 0)
|
||||
return -1;
|
||||
if (item < 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue