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;
|
wiiu_input_t *wiiu = (wiiu_input_t*)data;
|
||||||
|
|
||||||
if (wiiu->joypad)
|
if (wiiu && wiiu->joypad)
|
||||||
wiiu->joypad->poll();
|
wiiu->joypad->poll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,7 @@ void input_remapping_set_defaults(void)
|
||||||
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND; j++)
|
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND; j++)
|
||||||
{
|
{
|
||||||
const struct retro_keybind *keybind = &input_config_binds[i][j];
|
const struct retro_keybind *keybind = &input_config_binds[i][j];
|
||||||
|
if (keybind)
|
||||||
settings->uints.input_remap_ids[i][j] = keybind->id;
|
settings->uints.input_remap_ids[i][j] = keybind->id;
|
||||||
}
|
}
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
|
|
Loading…
Reference in New Issue