xmb_node_allocate_userdata - cleanups

This commit is contained in:
twinaphex 2015-06-07 16:41:20 +02:00
parent ea891cae91
commit 017a61683b

View File

@ -634,19 +634,14 @@ static xmb_node_t *xmb_node_allocate_userdata(xmb_handle_t *xmb,
if (!info)
return NULL;
info->userdata = (xmb_node_t*)calloc(1, sizeof(xmb_node_t));
node = (xmb_node_t*)calloc(1, sizeof(xmb_node_t));
if (!info->userdata)
if (!node)
{
RARCH_ERR("XMB node could not be allocated.\n");
return NULL;
}
node = (xmb_node_t*)info->userdata;
if (!node)
return NULL;
node->alpha = xmb->categories.passive.alpha;
node->zoom = xmb->categories.passive.zoom;
@ -656,6 +651,8 @@ static xmb_node_t *xmb_node_allocate_userdata(xmb_handle_t *xmb,
node->zoom = xmb->categories.active.zoom;
}
info->userdata = node;
return node;
}