mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
gtk-primary-selection: fix segfault when no focus
This commit is contained in:
parent
bfa7f4ee0d
commit
658b590567
1 changed files with 3 additions and 0 deletions
|
@ -232,6 +232,9 @@ static void device_send_selection(
|
||||||
struct wlr_gtk_primary_selection_device *device) {
|
struct wlr_gtk_primary_selection_device *device) {
|
||||||
struct wlr_seat_client *seat_client =
|
struct wlr_seat_client *seat_client =
|
||||||
device->seat->keyboard_state.focused_client;
|
device->seat->keyboard_state.focused_client;
|
||||||
|
if (seat_client == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
wl_resource_for_each(resource, &device->resources) {
|
wl_resource_for_each(resource, &device->resources) {
|
||||||
|
|
Loading…
Reference in a new issue