Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Fixes crash of compositor when unvalidated keycode 0 is passed (#1833)
Browse files Browse the repository at this point in the history
* Fixes crash of compositor when unvalidated keycode 0 is passed from virtual keyboard

* Style fix
  • Loading branch information
amingin authored and emersion committed Sep 27, 2019
1 parent 5f78ea2 commit b1b93c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/wlr_virtual_keyboard_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ static void virtual_keyboard_keymap(struct wl_client *client,
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) {
Expand Down

0 comments on commit b1b93c2

Please sign in to comment.