Fix null pointer read in action_bind_sublabel_subsystem_add

This commit is contained in:
Dwedit 2018-05-28 09:37:43 -05:00
parent d00fe30f0e
commit 6ef5232f32

View File

@ -448,7 +448,7 @@ static int action_bind_sublabel_subsystem_add(
char *s, size_t len)
{
rarch_system_info_t *system = runloop_get_system_info();
const struct retro_subsystem_info *subsystem = system ?
const struct retro_subsystem_info *subsystem = (system && system->subsystem.data) ?
system->subsystem.data + (type - MENU_SETTINGS_SUBSYSTEM_ADD) : NULL;
if (subsystem && content_get_subsystem_rom_id() < subsystem->num_roms)