Fix potential de-referencing null pointer in SDL_EVDEV_kbd_keycode()

This commit is contained in:
Sylvain 2023-02-15 22:38:57 +01:00
parent e7376b7b74
commit d948e6c3c5
No known key found for this signature in database
GPG key ID: 5F87E02E5BC0939E

View file

@ -476,12 +476,12 @@ void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode,
unsigned int final_key_state;
unsigned int map_from_key_sym;
key_map = *kbd->key_map;
if (kbd == NULL) {
return;
}
key_map = *kbd->key_map;
kbd->rep = (down == 2);
if (keycode < NUM_KEYS) {