mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Try to be somewhat safer here in case of null pointer derefences
This commit is contained in:
parent
3a5a2d9de6
commit
ca80f13b2b
@ -100,7 +100,7 @@ static void wiiu_input_poll(void *data)
|
||||
{
|
||||
wiiu_input_t *wiiu = (wiiu_input_t*)data;
|
||||
|
||||
if (wiiu->joypad)
|
||||
if (wiiu && wiiu->joypad)
|
||||
wiiu->joypad->poll();
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,9 @@ void input_remapping_set_defaults(void)
|
||||
{
|
||||
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND; j++)
|
||||
{
|
||||
const struct retro_keybind *keybind = &input_config_binds[i][j];
|
||||
settings->uints.input_remap_ids[i][j] = keybind->id;
|
||||
const struct retro_keybind *keybind = &input_config_binds[i][j];
|
||||
if (keybind)
|
||||
settings->uints.input_remap_ids[i][j] = keybind->id;
|
||||
}
|
||||
for (j = 0; j < 4; j++)
|
||||
settings->uints.input_remap_ids[i][RARCH_FIRST_CUSTOM_BIND + j] = j;
|
||||
|
Loading…
x
Reference in New Issue
Block a user