1
0
Fork 0
forked from len0rd/rockbox

skin_debug: Don't segfault when dump a viewport with no children

Change-Id: I5dfcc53a735dab1552211cdf522f4d18d93e6ec8
This commit is contained in:
Solomon Peachy 2024-05-24 11:16:46 -04:00
parent 2dc6947a2d
commit 8825b33052

View file

@ -43,6 +43,9 @@ static char* error_message;
static inline struct skin_element*
get_child(OFFSETTYPE(struct skin_element**) children, int child)
{
if (children == NULL)
return NULL;
struct skin_element **kids = SKINOFFSETTOPTR(skin_buffer, children);
return kids[child];
}
@ -266,7 +269,7 @@ void skin_debug_params(int count, struct skin_tag_parameter params[])
case INTEGER:
printf("integer: %d", params[i].data.number);
break;
case DECIMAL:
printf("decimal: %d.%d", params[i].data.number/10,
params[i].data.number%10);