mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
udev_input_poll - add early return in case udev is NULL
This commit is contained in:
parent
bd1eebc579
commit
6a02cf174e
@ -375,6 +375,9 @@ static void udev_input_poll(void *data)
|
||||
struct epoll_event events[32];
|
||||
udev_input_t *udev = (udev_input_t*)data;
|
||||
|
||||
if (!udev)
|
||||
return;
|
||||
|
||||
udev->mouse_x = udev->mouse_y = 0;
|
||||
udev->mouse_wu = udev->mouse_wd = 0;
|
||||
udev->mouse_whu = udev->mouse_whd = 0;
|
||||
@ -459,7 +462,8 @@ static int16_t udev_analog_pressed(const struct retro_keybind *binds, unsigned i
|
||||
{
|
||||
unsigned id_minus = 0;
|
||||
unsigned id_plus = 0;
|
||||
int16_t pressed_minus = 0, pressed_plus = 0;
|
||||
int16_t pressed_minus = 0;
|
||||
int16_t pressed_plus = 0;
|
||||
|
||||
input_conv_analog_id_to_bind_id(idx, id, &id_minus, &id_plus);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user