mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(retroarch.c) Prevent dereference of NULL pointer
This commit is contained in:
parent
9b3cc339a7
commit
bc61ceb338
@ -3490,11 +3490,13 @@ static void menu_input_key_bind_poll_bind_state(
|
||||
input_driver_t *input_ptr = p_rarch->current_input;
|
||||
void *input_data = p_rarch->current_input_data;
|
||||
unsigned port = state->port;
|
||||
const input_device_driver_t *joypad =
|
||||
p_rarch->current_input->get_joypad_driver(p_rarch->current_input_data);
|
||||
const input_device_driver_t *joypad = NULL;
|
||||
const input_device_driver_t *sec_joypad =
|
||||
input_driver_get_sec_joypad_driver();
|
||||
|
||||
if (p_rarch->current_input->get_joypad_driver)
|
||||
joypad = p_rarch->current_input->get_joypad_driver(p_rarch->current_input_data);
|
||||
|
||||
memset(state->state, 0, sizeof(state->state));
|
||||
|
||||
/* poll mouse (on the relevant port) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user