(XMB) cleanup xmb_list_insert
This commit is contained in:
parent
f6e63f7755
commit
698e66be57
|
@ -1886,19 +1886,14 @@ static void xmb_list_insert(file_list_t *list,
|
|||
if (!list || !xmb)
|
||||
return;
|
||||
|
||||
list->list[i].userdata = (xmb_node_t*)calloc(1, sizeof(xmb_node_t));
|
||||
node = (xmb_node_t*)calloc(1, sizeof(xmb_node_t));
|
||||
|
||||
if (!list->list[i].userdata)
|
||||
if (!node)
|
||||
{
|
||||
RARCH_ERR("XMB node could not be allocated.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
node = (xmb_node_t*)list->list[i].userdata;
|
||||
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
current = menu->navigation.selection_ptr;
|
||||
|
||||
node->alpha = xmb->item.passive.alpha;
|
||||
|
@ -1913,6 +1908,10 @@ static void xmb_list_insert(file_list_t *list,
|
|||
node->label_alpha = xmb->item.active.alpha;
|
||||
node->zoom = xmb->item.active.zoom;
|
||||
}
|
||||
|
||||
if (list->list[i].userdata)
|
||||
free(list->list[i].userdata);
|
||||
list->list[i].userdata = (xmb_node_t*)node;
|
||||
}
|
||||
|
||||
static void xmb_list_delete(file_list_t *list,
|
||||
|
|
Loading…
Reference in New Issue