From c1ee98795af53ed3c90b0b8d2adc6e75f22f4a8a Mon Sep 17 00:00:00 2001 From: adlo Date: Wed, 10 Aug 2022 04:37:43 +0100 Subject: [PATCH] Fix segfault when opening window from another VT --- src/compositor/hopalong-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor/hopalong-view.c b/src/compositor/hopalong-view.c index e5347fe..c031f67 100644 --- a/src/compositor/hopalong-view.c +++ b/src/compositor/hopalong-view.c @@ -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);