diff options
-rw-r--r-- | tinywl/tinywl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c index 7f6de6bc..633b3f25 100644 --- a/tinywl/tinywl.c +++ b/tinywl/tinywl.c @@ -136,8 +136,10 @@ static void focus_view(struct tinywl_view *view, struct wlr_surface *surface) { * track of this and automatically send key events to the appropriate * clients without additional work on your part. */ - wlr_seat_keyboard_notify_enter(seat, view->xdg_toplevel->base->surface, - keyboard->keycodes, keyboard->num_keycodes, &keyboard->modifiers); + if (keyboard != NULL) { + wlr_seat_keyboard_notify_enter(seat, view->xdg_toplevel->base->surface, + keyboard->keycodes, keyboard->num_keycodes, &keyboard->modifiers); + } } static void keyboard_handle_modifiers( |