diff options
author | amingin <arni@alarstudios.com> | 2019-09-27 12:11:30 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-09-27 13:11:30 +0300 |
commit | b1b93c2c7e6cc9d804390c740c2a199814e8e5ba (patch) | |
tree | d1cc02c2d7916665205f2f025d157640132844a0 | |
parent | 5f78ea20fa12b7645521815d9fb54f9ecb2ffd10 (diff) |
Fixes crash of compositor when unvalidated keycode 0 is passed (#1833)
* Fixes crash of compositor when unvalidated keycode 0 is passed from virtual keyboard
* Style fix
-rw-r--r-- | types/wlr_virtual_keyboard_v1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/types/wlr_virtual_keyboard_v1.c b/types/wlr_virtual_keyboard_v1.c index fd0d7797..ddd38880 100644 --- a/types/wlr_virtual_keyboard_v1.c +++ b/types/wlr_virtual_keyboard_v1.c @@ -75,6 +75,9 @@ context_fail: static void virtual_keyboard_key(struct wl_client *client, struct wl_resource *resource, uint32_t time, uint32_t key, uint32_t state) { + if (key == 0) { + return; + } struct wlr_virtual_keyboard_v1 *keyboard = virtual_keyboard_from_resource(resource); if (!keyboard->has_keymap) { |