Merge pull request #6834 from Dwedit/null-fix_

Fix null pointer read in action_bind_sublabel_subsystem_add
This commit is contained in:
Twinaphex 2018-05-28 17:13:08 +02:00 committed by GitHub
commit 877766d0ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)