fix null deref

This commit is contained in:
Brad Parker 2018-08-18 01:10:05 -04:00
parent c59cbfc4e8
commit dfd85125ad
2 changed files with 14 additions and 11 deletions

View File

@ -1066,7 +1066,7 @@ static void command_event_init_controllers(void)
break;
}
if (set_controller && i < info->ports.size)
if (set_controller && info && i < info->ports.size)
{
pad.device = device;
pad.port = i;

View File

@ -543,6 +543,8 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
}
}
if (body_bg_color)
{
menu_display_set_alpha(body_bg_color, 1.0);
menu_display_draw_quad(
@ -554,6 +556,7 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
width,
height,
&body_bg_color[0]);
}
/* print each line */
for (i = 0; i < list->size; i++)