From 658b5905671ec229e44986e82af2666c40435d43 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 27 Nov 2018 21:09:41 +0100 Subject: [PATCH] gtk-primary-selection: fix segfault when no focus --- types/wlr_gtk_primary_selection.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/wlr_gtk_primary_selection.c b/types/wlr_gtk_primary_selection.c index 5a31d242..ebf4e5e3 100644 --- a/types/wlr_gtk_primary_selection.c +++ b/types/wlr_gtk_primary_selection.c @@ -232,6 +232,9 @@ static void device_send_selection( struct wlr_gtk_primary_selection_device *device) { struct wlr_seat_client *seat_client = device->seat->keyboard_state.focused_client; + if (seat_client == NULL) { + return; + } struct wl_resource *resource; wl_resource_for_each(resource, &device->resources) {