aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sway/input/keyboard.h1
-rw-r--r--sway/input/keyboard.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h
index 0b0c1549..d9251f4c 100644
--- a/include/sway/input/keyboard.h
+++ b/include/sway/input/keyboard.h
@@ -5,7 +5,6 @@
struct sway_keyboard {
struct sway_seat_device *seat_device;
- struct wl_list link; // sway_seat::keyboards
struct xkb_keymap *keymap;
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);
}