diff options
| author | Tony Crisci <tony@dubstepdish.com> | 2017-12-16 19:16:00 -0500 | 
|---|---|---|
| committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-16 19:16:00 -0500 | 
| commit | 0256cd1473a574c2eb087f420f8356fee9e08aa7 (patch) | |
| tree | a0376d4fa0077648b2c4eb8c844e470245c9a421 /sway | |
| parent | 9e4fc7253e5e82f443ae8e1a27ced12fb13f8a67 (diff) | |
| download | sway-0256cd1473a574c2eb087f420f8356fee9e08aa7.tar.xz | |
fix keyboard hotplugging
Diffstat (limited to 'sway')
| -rw-r--r-- | sway/input/keyboard.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index b9b571a6..ce0df3c5 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -103,9 +103,10 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) {  }  void sway_keyboard_destroy(struct sway_keyboard *keyboard) { -	xkb_keymap_unref(keyboard->keymap); +	if (!keyboard) { +		return; +	}  	wl_list_remove(&keyboard->keyboard_key.link);  	wl_list_remove(&keyboard->keyboard_modifiers.link); -	wl_list_remove(&keyboard->link);  	free(keyboard);  } | 
