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
This commit is contained in:
parent
5f78ea20fa
commit
b1b93c2c7e
|
@ -75,6 +75,9 @@ context_fail:
|
||||||
static void virtual_keyboard_key(struct wl_client *client,
|
static void virtual_keyboard_key(struct wl_client *client,
|
||||||
struct wl_resource *resource, uint32_t time, uint32_t key,
|
struct wl_resource *resource, uint32_t time, uint32_t key,
|
||||||
uint32_t state) {
|
uint32_t state) {
|
||||||
|
if (key == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
struct wlr_virtual_keyboard_v1 *keyboard =
|
struct wlr_virtual_keyboard_v1 *keyboard =
|
||||||
virtual_keyboard_from_resource(resource);
|
virtual_keyboard_from_resource(resource);
|
||||||
if (!keyboard->has_keymap) {
|
if (!keyboard->has_keymap) {
|
||||||
|
|
Loading…
Reference in New Issue