Skip to content

Commit

Permalink
Merge pull request #8 from adlocode/switch-vt-segfault
Browse files Browse the repository at this point in the history
Fix segfault when opening window from another VT
  • Loading branch information
kaniini authored Aug 10, 2022
2 parents e215524 + c1ee987 commit 7ac1bd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compositor/hopalong-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ hopalong_view_focus(struct hopalong_view *view, struct wlr_surface *surface)
struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat);

surface = hopalong_view_get_surface(view);
if (surface != NULL)
if (surface != NULL && keyboard != NULL)
wlr_seat_keyboard_notify_enter(seat, surface,
keyboard->keycodes, keyboard->num_keycodes, &keyboard->modifiers);

Expand Down

0 comments on commit 7ac1bd6

Please sign in to comment.