Merge pull request #1400 from lioncash/null

settings_data: Fix potential null pointer dereference
This commit is contained in:
Twinaphex 2015-02-09 17:13:57 +01:00
commit 5ddadf5935
1 changed files with 2 additions and 1 deletions

View File

@ -430,11 +430,12 @@ static int setting_data_bind_action_start(void *data)
{
rarch_setting_t *setting = (rarch_setting_t*)data;
struct retro_keybind *def_binds = (struct retro_keybind *)retro_keybinds_1;
struct retro_keybind *keybind = (struct retro_keybind*)setting->value.keybind;
struct retro_keybind *keybind = NULL;
if (!setting || !driver.menu)
return -1;
keybind = (struct retro_keybind*)setting->value.keybind;
if (!keybind)
return -1;